Legit Security disclosed in September 2025 that instructions hidden in an invisible comment in a pull request description could make GitHub Copilot Chat, running with the viewer's permissions, search the viewer's private repositories for secrets such as AWS_KEY and smuggle the results out through GitHub's Camo image proxy. GitHub fixed it by 14 August 2025 by disabling image rendering in Copilot Chat. No user action is needed for the fix, but secrets committed to private repositories remain reachable by any AI assistant that can read them.
What was exposed
No exploitation in the wild was reported; this is a vulnerability that put credentials at risk. Anything Copilot Chat could read on behalf of the person viewing the pull request: source code and issues in that person's private repositories, including any secrets committed there. In its proof of concept Legit had Copilot search a victim's code for AWS_KEY and leak the result, and separately leaked the description of an unpublished vulnerability from a private issue. Exfiltration worked by having Copilot render a sequence of pre-generated Camo image URLs, one per character, which got around GitHub's Content Security Policy. Legit does not say real AWS keys were retrieved from any third party.
Am I affected?
Before GitHub's fix on 14 August 2025, any Copilot Chat user who opened a pull request containing the hidden instructions and asked Copilot about it could have had private data read and sent out. Since image rendering is now disabled in Copilot Chat, the specific channel is closed and you do not need to update anything. You are still exposed to the general risk if your private repositories contain committed secrets and you use AI assistants on untrusted pull requests, issues or comments. There are no public indicators of exploitation to check.
What to do now
- Scan private repositories for committed secrets (GitHub secret scanning can do this) and rotate any you find; remove them from the code and history.
- Treat pull requests and issues from people outside your organization as untrusted input when asking an AI assistant to summarise or review them.
- Keep cloud keys and API tokens out of repositories altogether; load them at run time from a secret store.
- Limit which repositories an AI assistant or agent can read to the ones a task needs.
Keys to rotate
Guides to the credentials this incident put at risk:
Timeline
- Legit Security, which found the flaw in June 2025 and reported it through HackerOne, says GitHub reported the fix in place on this date, disabling image rendering in Copilot Chat entirely. Source
- Legit Security publishes the details, rating the issue CVSS 9.6. Source
Indicators
From the advisories listed below. Use them to search your logs, lockfiles and workflow runs.
- Pull request descriptions containing hidden HTML comments with instructions addressed to Copilot.
- Sequences of
camo.githubusercontent.comimage URLs in AI-generated replies.
What this changes for credential handling
- The attack searched code for secrets because secrets were in the code. BotPassword keeps credentials in a vault and injects them when a command runs, so repositories have nothing to find.
Frequently asked questions
Am I affected by the GitHub Copilot Chat incident?
Before GitHub's fix on 14 August 2025, any Copilot Chat user who opened a pull request containing the hidden instructions and asked Copilot about it could have had private data read and sent out. Since image rendering is now disabled in Copilot Chat, the specific channel is closed and you do not need to update anything. You are still exposed to the general risk if your private repositories contain committed secrets and you use AI assistants on untrusted pull requests, issues or comments. There are no public indicators of exploitation to check.
What was exposed in the GitHub Copilot Chat incident?
No exploitation in the wild was reported; this is a vulnerability that put credentials at risk. Anything Copilot Chat could read on behalf of the person viewing the pull request: source code and issues in that person's private repositories, including any secrets committed there. In its proof of concept Legit had Copilot search a victim's code for AWS_KEY and leak the result, and separately leaked the description of an unpublished vulnerability from a private issue. Exfiltration worked by having Copilot render a sequence of pre-generated Camo image URLs, one per character, which got around GitHub's Content Security Policy. Legit does not say real AWS keys were retrieved from any third party.
Which keys should I rotate?
Rotate any GitHub, AWS (IAM access keys) credentials that were reachable from affected systems, starting with the ones that can publish code or reach production.
Other ai agent and mcp incidents
- OpenCode on Windows and WSL ran commands from a malicious MCP server during OAuth sign-in 2026-10-04
- OpenCode server's upgrade endpoint let any webpage install an attacker's npm package 2026-09-24
- Cursor before 3.0: prompt-injected agent could escape its sandbox and run code as the user 2026-06-05
- Claude Code trust dialog could be bypassed with a spoofed git worktree, running repo hooks 2026-04-24
- Claw Chain: four OpenClaw flaws let a foothold read agent secrets and escape the sandbox 2026-04-23
- OpenClaw Control UI sent its gateway token to any gatewayUrl in a link, enabling 1-click RCE 2026-01-31