Adversa AI researchers have disclosed a GitHub Copilot CLI attack that uses encrypted instructions to extract developer secrets through an attacker-controlled webpage.
Published on October 6, 2026, the research describes Cryptographic Context Injection (CCI), a technique that turns decrypted runtime output into instructions the coding agent trusts.
In a demonstration, Copilot CLI transmitted the contents of a .env.prod file to an attacker’s endpoint within 28 seconds. The chain required autopilot mode and a permissive model, rather than a universal compromise or bypass of confirmation prompts.
GitHub Copilot CLI Flaw Uses Encrypted Prompts
The attack begins when a developer asks Copilot CLI to retrieve an external webpage. The page presents encrypted content, requests Python-based decryption, and supplies two purported candidate keys.
One is legitimate; the other is a template requiring information from local files. To prepare the templated key, the agent reads targeted files and incorporates their contents into a string. This collection occurs before successful decryption.
The corresponding decryption attempt deliberately fails, prompting the agent to try the genuine key instead. Successful decryption reveals a second-stage instruction directing Copilot to fetch another URL for additional context.
That request embeds the previously collected file contents in a parameter, delivering the secrets to the attacker. Researchers reported that the visible transcript neither identified the destination host nor indicated that files had left the machine.
The distinction is where malicious instructions become readable. Encryption conceals them until execution inside the agent’s runtime, after which the agent treats the resulting plaintext as trusted context.
According to Adversa AI, equivalent plaintext instructions were detected and refused as prompt injection.
Microsoft’s mai-code-1.1-flash completed the attack in 50% of the researchers’ runs, while two GPT-5.6 models consistently rejected the same payload. The report does not establish that every Copilot model or session is vulnerable.
On one tested paid account, researchers manually selected the susceptible model. However, another account using Auto routing received both susceptible and resistant models across sessions, creating inconsistent protection without an explicit model choice.
Accessible targets included files outside the working directory. Adversa AI submitted the finding to GitHub’s bug bounty program on September 17, 2026.
GitHub validated the behavior but declined to classify it as a vulnerability because the user requested attacker-controlled content while granting autonomous permissions.
The chain remained reproducible on October 1; concrete payloads were withheld. The researchers recommend controls around the agent rather than reliance on model refusals.
Defenders should correlate webpage retrieval, code execution, local-file access, and unexpected outbound connections; retain tool-call traces with resolved arguments; restrict new destinations; and isolate untrusted content from contexts holding credentials and filesystem access.
Join 16,000+ SOC teams using ANY.RUN to streamline threat investigations and reduce manual effort. Explore for your team