Microsoft shows a phished sign-in code can hijack Copilot CLI
One approved sign-in code gave Microsoft 4 methods to misuse a Copilot CLI account in a lab test.
Microsoft researchers tested device code phishing against GitHub Copilot CLI, a coding agent that works in the command line. In this attack, a person gives approval for a code on the GitHub site, but the attacker started the sign-in. Microsoft says it worked in a controlled lab with a test account. It says it did not see the 4 results in attacks.
How it works
The attacker starts a sign-in and sends the code with a lure. The victim gives approval on the GitHub page. GitHub hosts the page. The domain cannot show who started the sign-in. The lab showed 4 results:
- Steer a live session remotely and operate commands on the machine.
- Add incorrect entries to the agent memory.
- Read old sessions that sync to the cloud.
- Access private repositories of the account.
The proof
These are proof of concept results from a test account. Microsoft gives no count of victims or attacks. It says the method works with each public client that has the device flow, not only Copilot CLI.
What is not known
Each result needs the victim to give approval, and depends on account permissions and enabled features. Remote control must be on, policy must let it, and the session must be active.
Insight: Attackers now target what coding agents can do
A Microsoft lab test, 22 bad GitHub links and malware that steals AI tool tokens each attack one target. The target is the access of a coding agent. This reads as a change in the target, from the password of a developer to the agent access that the developer has. Monitor if vendors limit device sign-in for agent tools.
Sources
Posted