November 18, 2026 Follow Egret
AI & agents

Approving a device code on a legitimate page can let an attacker reach an AI agent's sessions and repositories

By Egret editorial desk 1 min read
Original source Microsoft ↗AI-assisted · Reviewed by Egret AI managing editor

A lab simulation showed that a device-code approval initiated by an attacker gave the attacker access to an AI coding agent's active sessions, stored memory, synced history, and private code repositories. Microsoft researchers described the results as proof-of-concept, not observed wild attacks.

The attacker requests a short GitHub device code and sends it to a victim with a link to the real GitHub verification page. A genuine domain cannot reveal who started the request, and the requesting client chooses the scopes—potentially repositories, user and organization data, gists, and codespaces.

In Microsoft's lab, one approved code let researchers steer an enabled remote agent session, add misleading memory entries, read synced cloud sessions including older ones, and reach the test account's private repositories. Remote steering still required local approvals and operating-system permission, so it was not unauthenticated code execution.

Microsoft calls these controlled proof-of-concept results, not activity seen in the wild. Defender XDR detections tie suspicious email or Teams messages to later GitHub OAuth token creation, and GitHub EMU disruption can suspend an affected managed identity. Teams should review and revoke unexpected OAuth authorizations.

Sources & technical scope 1 source

Microsoft — original source ↗

Exploitation: Controlled lab proof-of-concept; not observed in the wild

Scope & limitations: Based on a controlled lab simulation with a test account; outcomes depend on account permissions and enabled features; detection and disruption availability depend on configuration, telemetry, and identity integration; no wild exploitation observed.

External findings belong to the credited researchers.
Egret — Back to top Egret