Documented incidentPublished 2025-05-26GitHub MCP usersEngineering postmortem

Prompt injection in a public GitHub issue makes an MCP-connected agent leak private repository data (2025)

Invariant Labs showed that a malicious instruction placed in an issue on a public repository could be read by an agent connected through the GitHub MCP server.

What happened

  • The agent then accessed the user's private repositories and could leak details such as private repository names and personal information.GitHub MCP Exploited: Accessing private repositories via MCP
  • Recommended mitigations include giving agents access only to the repositories they need and monitoring agent tool calls.GitHub MCP Exploited: Accessing private repositories via MCP

The failure pattern

Watch the pattern: Indirect prompt injection changes agent behavior

Safeguards that address it

CollectSEA's engineering analysis of what would have prevented or contained this failure.

  • Scope agent credentials per task and repositoryGrant tokens only for the repositories the current task needs so injected instructions cannot reach private data.
  • Separate untrusted content from instructions and review tool callsTreat issue text as data, and require confirmation before an agent reads from one trust domain and writes to another.

Related standards

CollectSEA's mapping through this incident's failure pattern; not an official determination by the standards bodies.

Building something similar?

Describe your design and see every precedent that applies, with safeguards you can hand to your coding agent.

Analyze your design
Security advisory2026-10-16AI system

Software component issue could allow unintended commands to run

The The Slim SEO – AI SEO Plugin, Lightweight, Fast & Automated plugin for WordPress is vulnerable to arbitrary shortcode execution in all versions up to, and including, 4.11.1 This is due to the software allowing users…

Indirect prompt injection changes agent behaviornvd.nist.gov
Security advisory2026-10-16AI agent

Software component issue could allow unintended commands to run

The DoubleScale | All-in-One CRM – Sales, Multi-Channel Marketing, Newsletter, Booking, Helpdesk, Automation, MCP & More plugin for WordPress is vulnerable to Arbitrary File Upload in all versions up to, and including,…

Indirect prompt injection changes agent behaviornvd.nist.gov