All vulnerabilities
CRITICALAI/LLM

AI-COPILOT-CAMOLEAK-2025

GitHub Copilot · GitHub Copilot Chat

Summary

Legit Security disclosed CamoLeak (CVSS 9.6), a critical vulnerability in GitHub Copilot Chat enabling silent exfiltration of private source code and secrets. The attack combined remote prompt injection via hidden pull-request comments with a CSP bypass that abused GitHub's own Camo image proxy: injected instructions made Copilot extract sensitive repo context, encode it character-by-character into a pre-generated dictionary of Camo image URLs, and leak it through image requests to an attacker server. GitHub mitigated it by disabling image rendering in Copilot Chat in August 2025.

How to avoid it in your code

  • Apply GitHub's mitigation (image rendering disabled in Copilot Chat); keep clients updated.
  • Treat PR comments and repo content as untrusted data, not instructions, to the assistant.
  • Sanitize/encode assistant output and block auto-fetched images and image proxies.
  • Restrict egress to an allow-list so encoded data cannot reach attacker servers.
  • Never expose secrets or private repo context to assistants with external-content access.

References

Related vulnerabilities

All AI/LLM →