---
title: Microsoft: one phished GitHub device code can let an attacker steer a Copilot CLI session, plant agent memories, read synced sessions and reach private repos | ctxsec
url: https://ctxsec.com/items/microsoft-device-code-phishing-github-copilot-cli-remote-session-steering-memory-poisoning-private-repos-lab
description: "Microsoft's researchers started a GitHub device-flow sign-in with the public Copilot CLI client ID and had a test victim approve the code on the real github.com page. With that single approval they could, depending on settings, remotely steer an active Copilot CLI session (if remote control was enabled and allowed by policy) and have the agent run commands within local approval settings, add misleading entries to Copilot Memory, read sessions synced to the cloud, and access the account's private repositories. Microsoft stresses that these are features working as designed after a phished authorization, not observed attacks, and that any public device-flow client can be abused the same way, with the attacker choosing the scopes."
status: "research (Microsoft Security Blog, Nov 17, 2026; controlled lab simulation, not observed in the wild)"
published: 2026-11-17
---

> Microsoft's researchers started a GitHub device-flow sign-in with the public Copilot CLI client ID and had a test victim approve the code on the real github.com page. With that single approval they could, depending on settings, remotely steer an active Copilot CLI session (if remote control was enabled and allowed by policy) and have the agent run commands within local approval settings, add misleading entries to Copilot Memory, read sessions synced to the cloud, and access the account's private repositories. Microsoft stresses that these are features working as designed after a phished authorization, not observed attacks, and that any public device-flow client can be abused the same way, with the attacker choosing the scopes.

[← Context & Harness Attacks](/context) · [markdown](/items/microsoft-device-code-phishing-github-copilot-cli-remote-session-steering-memory-poisoning-private-repos-lab.md)

research (Microsoft Security Blog, Nov 17, 2026; controlled lab simulation, not observed in the wild)

2026-11-17 · published here

2026-11-20 11:44 AM ET

### Microsoft: one phished GitHub device code can let an attacker steer a Copilot CLI session, plant agent memories, read synced sessions and reach private repos

- **Rule for staff:** enter a device code only for a sign-in you started; an unexpected 'verify Copilot' code is phishing even on github.com.
- **Org settings:** use the least permissive 'Store local sessions in the Cloud' policy for Copilot seats; trim repository roles.
- **Response:** revoke unexpected OAuth authorizations and review Copilot Memory entries (disabling memory doesn't delete existing ones).

Sources: [Microsoft Security Blog: The risks of device code authentication for AI coding agents (Nov 17, 2026)](https://www.microsoft.com/en-us/security/blog/2026/11/17/the-risks-of-device-code-authentication-for-ai-coding-agents/)
