NewsResearch
Microsoft: a device code phish against GitHub Copilot CLI can hand an attacker a developer's repositories, synced agent sessions and the agent's memory
Uri Oren and Dor Edry of Microsoft Security Research published a lab study on November 17, 2026. An attacker starts a GitHub device code sign-in with GitHub Copilot CLI's client ID, choosing the scopes, including repo, and sends the code and the real GitHub verification link to the victim, for example as an IT request or a Copilot license check. When the victim approves on github.com, the attacker's client is signed in. In the test this let them read Copilot CLI sessions synced to the cloud, reach private repositories, add misleading entries to Copilot Memory through the /memory command, and steer an active session where remote control was on, still subject to the session's approval prompts, which Microsoft says is not unauthenticated remote code execution. Copilot CLI is the example: any public client that supports the device flow can be abused the same way. Microsoft says it has not seen these outcomes in the wild, and has added Defender detections for the phish over email and Teams.
Why it matters
A real GitHub page does not make the request safe. Enter a device code only for a sign-in you started yourself, review and revoke OAuth apps you do not recognize, keep Copilot CLI's cloud session storage at the least permissive setting you can, and check Copilot Memory for entries you did not write; turning memory off does not delete them.