Rogue Agents Watch › Records › github-mcp-server-private-repo-leak

GitHub MCP server could be steered via a public issue into leaking private repository contents

Disclosed · added to the index · last updated

Grades

Verification status
Reported — Publicly reported but not independently confirmed. Never present a reported incident as confirmed.
Sourcing confidence
Primary — Backed by primary sourcing — first-party disclosure, vendor incident report, government advisory, or court documents.
AI role
Significant — AI materially enabled or accelerated the operation, but was one of several important components.
Severity
Medium — Limited or contained harm, or high-signal capability demonstration.

Summary

Research first disclosed in May 2025 (by Invariant Labs) and explained by Cybernews showed that an AI agent connected through the GitHub MCP server could be steered by instructions hidden in a public issue into reading private repositories accessible to its token and pasting their contents into a public pull request, making the data public. The work is a proof-of-concept against the researchers' own setup rather than an observed in-the-wild attack; the core weakness is over-broad agent token access combined with treating issue content as instructions. It is catalogued as an agent-hijack prompt-injection product vulnerability.

Impact as stated

Per the research as explained by Cybernews: an agent on the GitHub MCP server could be induced through a public issue to read private repositories and expose their contents in a public pull request. Proof-of-concept; no in-the-wild victims.

Facts as stated by sources

Actor
Security researchers (proof-of-concept; original research attributed to Invariant Labs) (Researcher)
Category
Agent hijack / prompt injection
Models named
not named by sources
Model families
Other / unspecified
Agentic autonomy level
Not applicable
Guardrail bypass
Indirect prompt injection
Attack lifecycle phases
Execution, Exfiltration
Target sectors
Technology
Target countries
not stated
Organisations affected
not stated
Records exfiltrated
not stated

Framework mappings

MITRE ATLAS
AML.T0051.001, AML.T0053, AML.T0065, AML.T0085.001, AML.T0086, AML.T0093

Mitigations as stated

  • Limit agent token scope (especially cross-repository and private access), treat issue and other user content as untrusted data rather than instructions, and require review of actions that publish data.

Map

No cited source states a location; this record is listed beside the map, never plotted.

Related records

Sources (2; 2 distinct publishers)

  1. GitHub MCP Exploited: Accessing private repositories via MCP
    Invariant Labs · Research paper · · archived copy
  2. GitHub MCP vulnerability explained
    Cybernews · News · archived copy

Cite this record

Agentic Attack Index (MLSecOpsHub), dataset v0.9.0, record "github-mcp-server-private-repo-leak". https://raw.githubusercontent.com/MLSecOpsHub/agentic-attack-index/v0.9.0/dist/incidents/github-mcp-server-private-repo-leak.json — CC BY-SA 4.0.

Record JSON · Source YAML · Report a correction