VV-015highAgent hijacking2025-05-26
GitHub MCP server: a public issue makes the agent leak private repos
Invariant Labs showed that a prompt injection planted in a public GitHub issue could get an agent using the official GitHub MCP server to pull data from the user’s private repositories.
What it is
Published 26 May 2025. The agent has one GitHub token covering public and private repos; when it reads the attacker’s issue, the injected text asks it to fetch private data and post it publicly.
Invariant describes it as a “toxic agent flow”: the server works as designed, the danger comes from combining untrusted input with broad access.
How to check
- Check what scopes the GitHub token used by your MCP server has, and whether it covers private repos.
- See whether your agent auto-approves GitHub tool calls.
How to fix
- Give the agent a fine-grained token limited to the repos it needs.
- Turn off auto-approval for tools that write to GitHub.
Sources
More advisories for this tool
- criticalCVE-2026-32871: FastMCP OpenAPI Provider has an SSRF & Path Traversal Vulnerability
- criticalCVE-2025-6514: mcp-remote exposed to OS command injection via untrusted MCP server connections
- criticalCVE-2025-49596: MCP Inspector proxy server lacks authentication between the Inspector client and proxy
- highCVE-2026-104850: MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server