RoguePilot Prompt-Injection Flaw in GitHub Codespaces Allowed Copilot to Leak `GITHUB_TOKEN`
Emerging Technology Risk · 2 sources · Updated 5mo ago · First seen Feb 25, 2026

Microsoft patched an AI-mediated vulnerability in GitHub Codespaces dubbed RoguePilot (reported by Orca Security) that could let an attacker seize control of repositories by embedding hidden instructions in a GitHub issue. When a developer launched a Codespace from a malicious issue, the issue text could be automatically ingested by the built-in GitHub Copilot agent, enabling passive/indirect prompt injection that coerced the agent into executing attacker-directed actions and leaking sensitive credentials—most notably a privileged GITHUB_TOKEN—potentially enabling repository takeover and downstream supply-chain impact.
The disclosure reinforces a broader risk pattern where developer tools and AI agents become high-trust entry points for supply-chain compromise, as highlighted by commentary describing how dev-platform footholds can cascade into cloud and SaaS environments via token theft and trusted integrations. Separate reporting also notes increasing attacker speed and AI-enabled tradecraft, but those items are not specific to RoguePilot; the core actionable takeaway is that AI agents embedded in developer workflows can be manipulated through untrusted content (e.g., issues/PRs) unless strong isolation, least-privilege token scoping, and explicit user confirmation/guardrails prevent autonomous execution and secret exfiltration.


