IncidentPrompt injection
GitHub Copilot CLI: encrypted instructions on a web page made the agent read .env secrets and send them out
Rony Utevsky of Adversa AI showed a technique he calls Cryptographic Context Injection against GitHub Copilot CLI running in autopilot mode. A web page holds encrypted instructions and decryption keys. When the agent fetches the page it tries to decrypt them, and on the way it builds a key from local files, including an .env file holding secrets; the first key fails, a second one works, and the decrypted instructions tell the agent to fetch another address with the harvested contents attached. Microsoft's mai-code-1.1-flash model ran the whole chain in half of Adversa's runs, while two OpenAI GPT-5.6 models refused, and users on the Auto model setting do not see which model handles their session. Adversa reported it to GitHub on September 17; GitHub declined to treat it as a vulnerability, saying it "requires a user to intentionally direct Copilot CLI to fetch attacker-controlled or untrusted content and confirm they want to trigger the action". Adversa says the chain still works.
Replay the attack step by step in the Learning Center
How it happened
- Instructions on a web page are encrypted, so nothing that scans the page sees them in plain text.
- Decrypting them is framed as a task, and the agent reads local secret files to build the key.
- The decrypted instructions make the agent request an attacker's address with the secrets attached.
Impact
Secrets from local environment files sent to an attacker by a coding agent that was only asked to read a web page; no fix, as GitHub does not consider it a vulnerability.
The fix
Do not run coding agents in autopilot on untrusted web content; require approval for new network destinations, keep secrets out of the working folder, and pick a model rather than Auto when the agent can read and send.
Lessons
- Encryption hides an injection from scanners; the defense has to be on what the agent can read and where it can send, not on spotting the text.
- Which model sits behind an agent changes whether an attack works, and an Auto setting hides that from the user.