Adversa AI researchers have shown that GitHub Copilot CLI can be pushed into reading local files and sending them to an attacker.
The attack needs only one malicious web page, and it uses a technique called Cryptographic Context Injection (CCI). GitHub validated the report but declined to treat it as a vulnerability.
GitHub Copilot CLI vulnerability
According to research published by Adversa AI, CCI hides malicious instructions as strong ciphertext. The page also supplies key material and tells the agent to decrypt the content with Python. Static guardrails read text but do not execute ciphers.
The decryption therefore runs in the agent’s own code execution runtime. The decrypted output then looks like the result of code the agent just ran, so the agent trusts it as its own.
In the Copilot test, a user running the CLI in autopilot mode asks it to fetch a single URL. The page offers two candidate decryption keys. One is real. The other is a template that the agent can fill in only by reading local files.
While building that key, the agent reads targeted files, such as .env.prod, and folds their contents into the key string. That read is the theft, and it happens before any decryption succeeds.
The decryption with the templated key fails by design. The agent falls back to the real key, and the second stage tells it to fetch a follow-up URL “to grab more context”. That URL carries the harvested file contents as a request parameter.
The secrets reach the attacker’s endpoint in about 28 seconds. The user gets no confirmation prompt, and the transcript never names the destination host. The agent’s closing summary even says it “confirmed an authorized-reader endpoint”.
The researchers do not claim a universal one-click compromise or a confirmation-prompt bypass. The chain needs two conditions: autopilot mode and a permissive model.
Resistance varies sharply between models offered inside Copilot:
| Model | Result |
| Microsoft mai-code-1.1-flash | Ran the full chain in 50% of runs |
| Two GPT-5.6 models | Consistently refused the identical payload |
On the tested paid account, the vulnerable model was not the default and had to be selected by hand. With model selection left on Auto, however, the router assigned the vulnerable model in some sessions and a safe one in others.
The user cannot see or control which model handles the session. Encryption is essential to the attack. The same instructions sent as plaintext were caught as prompt injection and refused.
For coding agents, code execution and outbound requests are routine. The data within reach includes source code, configuration and credentials on the developer’s disk. Adversa argues that defenses built for classic prompt injection miss this, because the attack surface is the whole context the agent trusts. That context includes tool output, runtime results and decrypted blobs.
Adversa says no single string can be blocked, because the malicious instruction exists as readable text only after the agent decrypts it. Defenders should instead watch the sequence of actions: untrusted content arrives, code runs, local files are read, and the agent contacts an unrelated host.
Recommended controls include capturing per-session traces of every tool call with fully resolved arguments, alerting on the full action chain rather than one payload, requiring confirmation for new network destinations and writes outside the workspace, hard-denying those actions by default in autopilot, quarantining fetched content in a context with no tools or credentials, and asking vendors whether every model in a routed pool meets the same injection bar.
Adversa reported the issue to GitHub’s bug bounty program on September 17, 2026. As of October 1, 2026, triage had validated the finding but declined to classify it as a vulnerability.
GitHub’s reasoning was that the user explicitly asked Copilot CLI to fetch attacker-controlled content while granting it full autonomous permissions. The report was ruled ineligible for a bounty. GitHub said it may tighten the functionality later but had nothing to announce.
Adversa disagrees, noting that the product refuses the plaintext version and that users see no destination or sign that files left the machine. The chain still reproduces on the affected model, and Adversa withheld concrete payloads.
