A public issue steered an agent through the GitHub MCP server into publishing private repository data
Invariant Labs showed in May 2025 that an attacker can file an issue on a public repository containing a prompt injection, and a developer's agent connected through the GitHub MCP server will then read private repositories and publish their contents in a pull request on the public one. The researchers state that no server side patch can fix it.
The verdict
Verified
The document exists. The ledger fetched it at its publisher and quotes it.
Key facts
What the sources say
- Record ID
- AIL-2026-0008
- Kind
- Injection
- Jurisdiction
- United States
- Last verified
- Added
- Invariant Labs states that an attacker can create a malicious issue on a public repository containing a prompt injection.
- The researchers state this is not a flaw in the GitHub MCP server code but an architectural issue that must be addressed at the agent system level.
- Their recommended mitigations are one repository per agent session and least privilege tokens, because there is no vendor patch for this class.
- A public issue on the GitHub MCP server repository records that the client confirmation dialog is weak because users approve without expanding the detail.
- GitHub separately hardened its editor agent with confirmations for files outside the workspace and before starting an MCP server.
Dimension by dimension
7 dimensions, each one stated, silent or open
Identity, Authorization, Delegation, Limits, Human approval, Revocation, Logging and audit. Stated means the document you can open below says it; silent means the ledger read the document and it does not.
- IdentitySilent
- Any anonymous account could file the issue that the agent then treated as an instruction.Invariant Labs, GitHub MCP exploited, primary source, 26 May 2025.
- AuthorizationSilent
- One personal access token covered public and private repositories, so reading the attacker's issue and reading private code were the same authority.Invariant Labs, GitHub MCP exploited, primary source, 26 May 2025.
- DelegationSilent
- The agent held the developer's whole token rather than a grant scoped to the task, which the researchers name as the fix.Invariant Labs, GitHub MCP exploited, primary source, 26 May 2025.
- LimitsSilent
- Nothing capped cross repository reads inside one session.Invariant Labs, GitHub MCP exploited, primary source, 26 May 2025.
- Human approvalOpen
- A confirmation step exists in the client, but the public issue records that its collapsed preview makes the approval uninformed.GitHub, github-mcp-server issue 844, primary source, 8 August 2025.
- RevocationSilent
- No vendor patch removed the capability, and the researchers state the platform alone cannot resolve it.Invariant Labs, GitHub MCP exploited, primary source, 26 May 2025.
- Logging and auditOpen
- The exfiltration lands in a public pull request, which is durable evidence, but no detection control is documented.Invariant Labs, GitHub MCP exploited, primary source, 26 May 2025.
What it changes
For a team deploying an agent
There is no patch coming for this one, which makes delegation the only control you own. Issue an agent a token scoped to the single repository it is working in, run one repository per session, and never let the same session hold public read and private read at once. Treat issue and pull request text as hostile input, because to your agent it is indistinguishable from your own instruction.
Sources
What this record was verified against
- Invariant Labs, GitHub MCP exploitedPrimary · 26 May 2025
- GitHub, github-mcp-server issue 844Primary · 8 August 2025
- The GitHub Blog, Safeguarding VS Code against prompt injectionsPrimary · 25 August 2025
- devclass, Researchers warn of prompt injection in GitHub MCPSecondary · 27 May 2025
Related
Records that sit beside this one
A support ticket steered a developer's assistant into reading a database through the Supabase MCP server
United States · verified 15 September 2026
General Analysis states that the editor assistant ingests untrusted customer text while holding service role privileges.
GitLost, where a platform's own workflow agent posted private repository contents into a public issue when asked politely
United States · verified 15 September 2026
The Register reports that the attacker hides the commands in plain English in the issue body and the agent then posts the data as a public comment.
A stranger's issue steered a continuous integration agent into reading the environment that held its own API key
United States · verified 15 September 2026
The research states that the returned environment blob contains the unscrubbed API key.
A support agent invented a policy its company did not have, and customers cancelled over it
United States · verified 15 September 2026
A company representative stated publicly that there is no such policy and that users are free to use the product on multiple machines.
A vendor's own red team made a browser agent send a resignation letter for the user, then showed the fixed agent refusing
United States · verified 15 September 2026
The vendor's own account states that the out of office reply never gets written and the agent resigns on behalf of the user instead.
A browser agent read the local file system and shipped it out while still answering the user normally
United States · verified 15 September 2026
The research states the agent autonomously accesses the local file system and exfiltrates the contents to an attacker controlled endpoint while still returning the expected response.
Cite this record
Free to reuse under CC BY 4.0, with attribution. The record ID AIL-2026-0008 is permanent and is never reused.
- In a sentence
- According to the GAGE Agent Incident Ledger (as of 15 September 2026), a public issue steered an agent through the github mcp server into publishing private repository data.
- APA
- GAGE (Global Academy of Generative-AI Education). (2026). A public issue steered an agent through the GitHub MCP server into publishing private repository data. Agent Incident Ledger. Retrieved 15 September 2026, from https://www.gage.academy/tools/agent-incident-ledger/records/AIL-2026-0008-github-mcp-server-injection-published-private-repo-data
- MLA
- "A public issue steered an agent through the GitHub MCP server into publishing private repository data." Agent Incident Ledger, GAGE (Global Academy of Generative-AI Education), 15 September 2026, https://www.gage.academy/tools/agent-incident-ledger/records/AIL-2026-0008-github-mcp-server-injection-published-private-repo-data.
- Chicago
- GAGE (Global Academy of Generative-AI Education). "A public issue steered an agent through the GitHub MCP server into publishing private repository data." Agent Incident Ledger. Last modified 15 September 2026. https://www.gage.academy/tools/agent-incident-ledger/records/AIL-2026-0008-github-mcp-server-injection-published-private-repo-data.
- Permalink
- https://www.gage.academy/tools/agent-incident-ledger/records/AIL-2026-0008-github-mcp-server-injection-published-private-repo-data
Last updated . Every record re verified . The ledger is checked weekly, every Monday, and the same day for any vendor disclosure.
Back to the full ledger, or every record for United States and every injection record.
GAGE briefings tell you which AI regulation deadlines are coming, what they actually require of you, and when a program opens.