MicrosoftUri Oren
Microsoft Shows Device Code Phishing Can Compromise Copilot CLI
Device code phishing is demonstrated as a pathway to compromise AI coding agents, not just mailboxes or email accounts. In a controlled lab, Microsoft used GitHub Copilot CLI to show how a phished device-code authorization can unlock a range of actions, depending on the user’s permissions and enabled features. The attacker starts a device-code sign-in request, the victim is lured to approve on a legitimate GitHub page, and once approved the attacker-controlled client signs in automatically.
The four potential outcomes observed in the simulation were: steering an active remote-capable Copilot CLI session; inserting misleading entries into the agent’s memory; reading cloud-synced Copilot CLI sessions; and accessing private repositories through the account’s granted scopes. Microsoft emphasises these are proof-of-concept results, not observed attacks in the wild, and require the victim’s approval and account permissions.
The post maps how the device code approval can cascade into broader impact and describes defender-oriented detections and responses. Microsoft Defender for Cloud Apps can link suspicious GitHub authentication activity to phishing attempts, with two detections for suspected Copilot CLI device code phishing delivered via email or Microsoft Teams. A disruption action is described for GitHub Enterprise Managed Users to suspend affected identities, interrupting attacker access.
Mitigation guidance calls for clear approval rules, warnings against unexpected verification pages, and regular reviews of OAuth authorisations, Copilot session and memory settings, and GitHub activity visibility in Defender. The report notes that repository access and remote control are bounded by the account’s permissions and enabled features, not by Copilot CLI alone. MITRE techniques observed include T1566.002 (Phishing: Spearphishing Link) and T1528 (Steal Application Access Token).