An encrypted web page tricked GitHub Copilot CLI into leaking a .env file
Adversa AI showed GitHub Copilot CLI in autopilot mode reading a local .env.prod file and sending its contents to an attacker URL after fetching a page with encrypted instructions. GitHub validated the report but does not consider it a vulnerability.
Adversa AI published research on October 6 showing that GitHub Copilot CLI, running in autopilot mode, can be steered by a web page into exfiltrating local secrets. The page holds encrypted instructions plus two candidate keys. The first key is a template the agent fills in by reading local files, in Adversa's test a .env.prod; that key fails to decrypt by design, the real key works, and the decrypted step tells the agent to fetch a second URL carrying the harvested contents. Adversa calls the technique Cryptographic Context Injection and says the chain took 28 seconds with no confirmation prompt. Microsoft's mai-code-1.1-flash model completed it in half of attempts; two GPT-5.6 models refused. Adversa reported it through GitHub's bug bounty on September 17. GitHub validated the finding but said it is not a product vulnerability because the user must direct the CLI to fetch untrusted content.
Why it matters
The control that failed is not the model; it is that a coding agent running as the developer can read every secret on disk and make outbound requests in the same session. Encryption is there to get past content classifiers that read text but do not execute it, so filtering the fetched page is not a defence you can rely on. Whether a session is exposed also depends on which model the Auto router picked, which the user cannot see.
Practical checks: keep production .env files off developer machines where agents run, prefer short-lived credentials pulled from a secrets manager at runtime, and do not combine autopilot with fetching arbitrary URLs. If a team has used autopilot against untrusted pages, rotate what was in the working directory. Background on the pattern is in agent instruction injection and the earlier GhostSplice research. Adversa's write-up is here.
Source: The Register
Related on Start with Identity
- BlogCISA contractor left AWS GovCloud admin keys in a public GitHub repo for six months
844 MB of agency data in a repo named Private CISA, including a file called importantAWStokens and plaintext internal passwords. Nine automated GitGuardian aler
- BlogGhostAction returns: about 1,900 hijacked GitHub accounts pushed secret-stealing workflows to 30,000 repos
GitGuardian counts more than 30,000 repositories and about 1,900 compromised GitHub accounts in GhostAction's October wave, which committed workflows that dump
- BlogJadePuffer used a service principal leaked in a GitHub issue to wipe Azure resources in seven minutes
Microsoft says the operator it tracks as Storm-3168 used two compromised service principals and an AI-driven toolchain to map an Azure tenant, pull storage keys
- CVEGitHub Enterprise Server SAML encrypted-assertion bypass
GHES with optional encrypted SAML assertions accepted a forged response. An unauthenticated attacker could provision a site administrator. Fixed in 3.9.15, 3.10
- CVEGitHub Enterprise Server SAML encrypted-assertion, incomplete fix
The leftover path after CVE-2024-4985. Encrypted SAML assertions on GHES could still be forged. GitHub shipped a second hardening pass. Treat 4985 and 9487 as o
- CVEBeyondTrust Remote Support zero-day, from file upload to the whole credential vault
An origin-validation flaw in self-hosted BeyondTrust Remote Support through 26.2.3 let ARMORY CASTLE plant a web shell, export every vaulted admin credential, a