These write-ups are not threat intelligence and are not kept up to date as an incident develops. They are here to show how each attack worked, so you can find and fix the same techniques in your own setup. For the latest on an incident, read its sources.
GitHub MCP / agentic token breadth
May 2025 – ongoing · Ongoing
An AI agent holding a token that reaches private repositories reads an issue someone wrote on a public repository, follows the instructions hidden in it, and copies private content into a public pull request or comment; no stolen credential is needed.
- Went after
- Read or expose private code
- Access held
Full summary
In May 2025 Invariant Labs showed it with the official GitHub MCP server. A developer had Claude Desktop connected to GitHub with a token for all their repositories and asked it to look at the open issues of one of their public repositories. One issue, written by the attacker, told the agent to gather information about the owner from their other repositories and add it to the README. The agent read the private repositories and opened a public pull request containing what it found. Invariant called it a toxic agent flow: untrusted input, private data and a way to publish, all reachable by one agent. A reporter on the server's issue tracker reproduced it and found that even a token limited to public repositories could read private ones in that setup; GitHub's maintainers treated it as a general risk of agents with write tools rather than a server bug. In July 2026 Noma Security showed the same against GitHub Agentic Workflows, where an organization can give an agent read access across its repositories: a normal-looking public issue got the agent to post private contents in a public comment.
How it unfolded
Pick a step to zoom into it. A dashed line is a step the sources do not state. Blue dots are the checklist items that break the step.
Whole path
The whole attack, one row per step. Pick a step on the left, or click a box in its row.
The developer connects an agent, here Claude Desktop with the official GitHub MCP server, to GitHub with a personal access token that reaches all their repositories, public and private, and can open pull requests.
What breaks this step
- Decide which AI coding agents and MCP servers may work on the organization's repositories
- Branch protection on default/release branches: required reviews of the last push + required status checks
- Give agents a token scoped to the single repository they're working on.
- Don't let an agent read public input and write to private repos in the same session.
Anyone can open an issue on a public repository. The attacker writes one that reads like a request from the owner: look at the owner's other repositories and add what you find about them to the README.
The developer asks the agent to look at the open issues. It reads the attacker's issue, cannot tell those instructions from its owner's, and follows them, reading the private repositories with the token it holds.
The agent opens a pull request on the public repository with the private details in it. In Invariant's demonstration that was the owner's private projects and personal information. A reporter on the server's tracker found that a token limited to public repositories still read private ones in that setup; GitHub's maintainers treated the report as a general agent risk rather than a server vulnerability.
In July 2026 Noma Security showed that GitHub Agentic Workflows, where an organization can give an agent read access across its repositories for context, can be steered by a normal-looking public issue into posting private repository contents in a public comment, with no stolen credential.
Frameworks
Part of
Ongoing. First seen May 2025. Mapping by ghtier, not yet reviewed. Threat landscape
Sources
- researchGitHub MCP exploited: accessing private repositories via MCP
- researchgithub-mcp-server issue #844: token scope reproduction
- trackerPublic GitHub issue could trick agentic workflows into leaking private repo data
- researchMCP horror stories: the GitHub prompt injection data heist
- researchAI GitHub agents: how one issue leaked private repos
Reported by: Invariant Labs, Orca Security, Noma Security