GitHub MCP prompt injection research

Researchers showed GitHub MCP agent leaking private repos

Disclosed May 26, 2025Technology

The record

Invariant Labs researchers showed that a malicious GitHub issue could hijack an AI agent using the GitHub MCP server. Asked only to review issues in a public repository, the agent read private repository data and published it in a public pull request. The demonstration leaked a test user's private project, relocation plans and salary; no victim in the wild was reported.

  • AI agent or AI tool
  • Deceived or targeted
  • Prompt injection or a poisoned tool
  • Research, no incident
Organisation
GitHub (MCP server), demonstrated by Invariant Labs
Insider
AI coding agent connected to the GitHub MCP server
Method
Invariant Labs said a malicious issue in a public repository carried instructions. When the owner asked the agent to review open issues, the agent pulled private repository data into its context and published it in a public pull request the attacker could read.
When
May 2025
How it was found
Not publicly stated
Outcome
Invariant Labs disclosed the attack on May 26, 2025 and said it is an architectural problem in agent systems rather than a bug in the GitHub MCP server code. The cited source records no GitHub statement or fix.
Damage
Not publicly stated

What each party says

  • Invariant Labs: Invariant Labs said the flaw "allows an attacker to hijack a user's agent via a malicious GitHub Issue" and make it leak private repository data into a public pull request.

    Unverified, per Invariant Labs

  • Invariant Labs: Invariant Labs said the issue is an architectural problem in agent systems, not a bug in the GitHub MCP server code; no GitHub statement is cited.

    Unverified, per Invariant Labs

Sources

Every fact above was checked against these on November 28, 2026.

  1. GitHub MCP Exploited: Accessing private repositories via MCP (opens in a new tab)Invariant Labs, company statement, May 26, 2025

How Above reads a case

Above's AI investigators work each insider and AI-agent signal to a verdict, with its evidence and reasoning.