Research demo
GitHub MCP server hijacked via malicious issue: agent coerced into leaking private repository data
AIR-2025-0037 AIR record · 2025-05-github-mcp-server-private-repo-exfiltration
From the supporting source
This is not a flaw in the GitHub MCP server code itself, but rather a fundamental architectural issue that must be addressed at the agent system level.invariantlabs.ai
The record
Disclosed
2025-05-26
Vendor
GitHub
Product
github/github-mcp-server
Risk domain
Privacy › Data exfiltration channels
Also touches
Confused deputy
System type
Generative model
Who acted
Agent acted — the agent read the private repo and wrote the data into a public PR
Attack surface
MCP server
Autonomy level
Semi-autonomous
Initial vector
Indirect prompt injection github issue
Impact type
Data exfiltration, Confused deputy, Private source code disclosure
Confidence
High
Submitted by
EAI Internal
Crosswalk
- OWASP Agentic Top 10 (2026)
- ASI02 – Tool Misuse and Exploitation
- MITRE ATLAS
- AML.T0024 – Exfiltration via AI Inference API
- NIST AI RMF
- MAP 4.2
- EU AI Act
- Article 10
- ISO/IEC
- TR 24028; 23894
- AIUC-1
- A. Data & Privacy
- Scope
- tool misuse
- Mitigation
- Monitor network traffic for anomalous patterns; Restrict egress destinations.
- Taxonomy
- Enkrypt AI agent risk taxonomy · Black-Box Red Teaming of Agentic AI: A Taxonomy-Driven Framework for Automated Risk Discovery
Blast radius
any user pointing an agent at the GitHub MCP server with a broadly-scoped PAT and reading public issues
Capability abused
Defense & remediation
Recorded defense
model alignment only (Claude 4 Opus was the tested agent)
Guardrail kinds
Unknown
Guardrail outcome
Silent
Fix shipped
none at the code level - Invariant framed it as architectural; mitigations are per-session repo scoping and least-privilege tokens
Taxonomy & references
Curator notes
Invariant Labs, 2025-05-26. Demonstrated against a live setup they controlled; exfiltrated private repo names, relocation plans and salary details into a public PR. No CVE assigned because GitHub treated it as an architectural/agent-design issue rather than a server bug. Simon Willison's writeup coined the framing widely reused as the 'lethal trifecta'. Also reported under the titles: 'GitHub MCP server: prompt injection in a public issue exfiltrates private repository contents'; 'GitHub MCP exploited: a malicious issue coerces the agent into leaking private repository data'.
Supporting sources
Cite as
Enkrypt AI. "GitHub MCP server hijacked via malicious issue: agent coerced into leaking private repository data". AIR, AIR-2025-0037. https://agentincident.vercel.app/i/AIR-2025-0037/ (accessed 2026-10-19).