AI NewsInfrastructureAnnouncement

Microsoft warns device code phishing can take over GitHub Copilot CLI sessions

Microsoft showed in a lab that one approved device code request can take over a GitHub Copilot CLI session.

AI News

Editorial3 min read

LinkedInX

Why it mattersA real GitHub verification page is not proof the sign-in is safe. Teams running coding agents should audit OAuth approvals today.

A real GitHub verification page is not proof the sign-in is safe. Microsoft Security Research said on Monday that one trick can take over a GitHub Copilot CLI session. The user approves a sign-in code. The attacker gets the session. From there, four separate things go wrong.

The post was written by Uri Oren and Dor Edry at Microsoft Security Research. It names the GitHub Copilot CLI as the test target. It lists device code phishing as the entry route. It tells users and organisations what to change this week. Microsoft says the chain was reproduced in "controlled lab simulation" and has not been seen in the wild.

How the attack chain works

In the device code flow, a client asks the identity provider for a short code. A person types that code into a verification page and approves the sign-in. Microsoft describes the abuse this way: "The attacker starts the request and persuades someone else to approve it." The user opens the real GitHub page. They sign in if needed. They approve the request. "After approval, the attacker-controlled client completes the sign-in automatically." The verification page is real. The approval is for a client the user never started.

Microsoft frames this as a recurring route. It names an earlier case. EvilTokens scaled this technique "to do real damage", in Microsoft's words. Microsoft disrupted EvilTokens in September 2026. It also cites a Storm-2372 device code phishing campaign, and an AI-enabled device code phishing campaign in 2026, without numbers.

The four things the lab reached from one approved code

With a Copilot CLI session in hand, the researchers showed four outcomes. They steered an active Copilot CLI session remotely and ran commands on the user's machine. They added misleading entries to the agent's memory that could influence later interactions. They read Copilot CLI sessions synced to the cloud. And they reached private repositories available to the account. The post notes any public OAuth client supporting the device flow can be abused. Copilot CLI is only the test target.

What Microsoft asks users to do

The user-level advice is short. Enter a device code only for a sign-in you started yourself. Treat an unsolicited verification request as phishing, even when the page is on a legitimate domain. Open the GitHub account settings, review authorised OAuth applications, and revoke any that are unexpected. If Copilot Memory is on, read the entries and remove any that look suspicious.

What Microsoft asks organisations to do

The organisation list is longer. Configure Safe Links policies in Microsoft Defender for Office 365. Review GitHub Copilot CLI session settings. Keep remote control permissions to the minimum the team needs. Limit repository access with appropriate organisation roles. Connect GitHub Enterprise Cloud to Microsoft Defender for Cloud Apps. The post names that connector as a way to detect the activity that follows this kind of compromise. Validate that the chosen tools log what an investigation would need before relying on them.

The quiet point is that the approval screen is the control. A session cookie stolen from a phishing kit looks suspicious to a defender. A session built by a user typing a real code into a real page does not. That is what makes this attack class useful to the person on the other end.

Source

Microsoft Security Research: The risks of device code authentication for AI coding agents, by Uri Oren and Dor Edry.

This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.

Share
LinkedInX
Start a project