# CamoLeak: hidden pull-request comments could make GitHub Copilot Chat leak private code and secrets

Source: https://botpassword.com/incidents/2025-09-github-copilot-camoleak
Disclosed: 2025-09-30 · Type: AI agent · Status: Resolved · Updated: 2026-10-25

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.

## Who is 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

1. Scan private repositories for committed secrets (GitHub secret scanning can do this) and rotate any you find; remove them from the code and history.
2. Treat pull requests and issues from people outside your organization as untrusted input when asking an AI assistant to summarise or review them.
3. Keep cloud keys and API tokens out of repositories altogether; load them at run time from a secret store.
4. Limit which repositories an AI assistant or agent can read to the ones a task needs.

## Keys to rotate

- [GitHub](https://botpassword.com/keys/github)
- [AWS (IAM access keys)](https://botpassword.com/keys/aws)

## Timeline

- 2025-08-14: 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](https://www.legitsecurity.com/blog/camoleak-critical-github-copilot-vulnerability-leaks-private-source-code))
- 2025-09-30: Legit Security publishes the details, rating the issue CVSS 9.6. ([source](https://www.legitsecurity.com/blog/camoleak-critical-github-copilot-vulnerability-leaks-private-source-code))

## Indicators

- Pull request descriptions containing hidden HTML comments with instructions addressed to Copilot.
- Sequences of `camo.githubusercontent.com` image URLs in AI-generated replies.

## Sources

- https://www.legitsecurity.com/blog/camoleak-critical-github-copilot-vulnerability-leaks-private-source-code
