Microsoft lab shows phished device code approval can steer GitHub Copilot CLI sessions
A controlled simulation found that approving an attacker-initiated device code can let an attacker steer Copilot CLI, alter memory, read cloud sessions and access private repositories.
Reported by Microsoft Security Blog
First reported Summary updated
- Public PoC
- Not known
- Exploited
- No
- Severity
- Not rated
What happened
Microsoft researchers simulated a device code phishing attack in which a victim test account approved a GitHub device-code request started by an attacker-controlled client.1
The researchers used GitHub Copilot CLI as an illustrative example, noting that any public client supporting the device flow can be abused in the same way.1
After approval, the researchers analysed four possible outcomes: remote steering of an active session, misleading memory entries, reading cloud-synchronised sessions, and access to private repositories.1
The outcomes are proof-of-concept results and were not observed in real attacks.1
Who is affected
- GitHub Copilot CLI1
Is there a public exploit?
Not known None of the sources mentions public exploit code yet.
Exploited in the wild?
Not yet The four outcomes were not observed in the wild.1
For bug hunters
This event centres on device code phishing, a social engineering route to account takeover rather than a software flaw. In bug bounty programmes, look at any OAuth device flow exposed by public clients, especially command-line tools and agents that hold broad scopes. Test whether an attacker-initiated code can be approved by a victim and whether the resulting token grants more than expected. Check for weak consent screens, missing scope restrictions and session controls that allow remote steering.
What to test
- Start a device flow with a public client and see which scopes can be requested.
- Check whether the consent page clearly shows the requesting client and scopes.
- Test if an approved device code token can access repositories or cloud sessions beyond the user's expectation.
- Look for remote control features that accept commands from a newly authorised session.
Written by bugbounty.wiki with AI from its source. Every statement above comes with a quote we checked against the source it cites (the numbers link to it); anything we could not check was left out. It can still be wrong, so read the coverage before relying on a detail.
Coverage
The article this story is based on. Each headline opens the outlet's own article.
-
1
Microsoft Security Blog
The risks of device code authentication for AI coding agents“Device code phishing has become a recurring route to account takeover.”