This is Part 3 of our MCP Horror Stories series, where we examine real-world security incidents that validate the critical vulnerabilities threatening AI infrastructure and demonstrate how Docker MCP Toolkit provides enterprise-grade protection.
The Model Context Protocol (MCP) promised to revolutionize how AI agents interact with developer tools, making GitHub repositories, Slack channels, and databases as accessible as files on your local machine. But as our Part 1 and Part 2 of this series demonstrated, this seamless integration has created unprecedented attack surfaces that traditional security models cannot address.
Why This Series Matters
Every Horror Story shows how security problems actually hurt real businesses. These aren’t theoretical attacks that only work in labs. These are real incidents. Hackers broke into actual companies, stole important data, and turned helpful AI tools into weapons against the teams using them.
Today’s MCP Horror Story: The GitHub Prompt Injection Data Heist
Just a few months ago in May 2025, Invariant Labs Security Research Team discovered a critical vulnerability affecting the official GitHub MCP integration where attackers can hijack AI agents by creating malicious GitHub issues in public repositories. When a developer innocently asks their AI assistant to ‘check the open issues’, the agent reads the malicious issue, gets prompt-injected, and follows hidden instructions to access private repositories and leak sensitive data publicly.
In this issue, we will dive into a sophisticated prompt injection attack that turns AI assistants into data thieves. The Invariant Labs Team discovered how attackers can hijack AI agents through carefully crafted GitHub issues, transforming innocent queries like “check an open issues” into commands that steal salary information, private project details, and confidential business data from locked-down repositories.
You’ll learn:
- How prompt injection attacks bypass traditional access controls
- Why broad GitHub tokens create enterprise-wide data exposure
- The specific technique attackers use to weaponise AI assistants
- How Docker’s repository-specific OAuth prevents cross repository data theft
The story begins with something every developer does daily: asking their AI assistant to help review project issues…

Caption: comic depicting the GitHub MCP Data Heist
The Problem
A typical way developers configure AI clients to connect to the GitHub MCP server is via PAT (Personal Access Token). Here’s what’s wrong with this approach: it gives AI assistants access to everything through broad personal access tokens.
When you set up your AI client, the documentation usually tells you to configure the MCP server like this:
# Traditional vulnerable setup - broad access token export GITHUB_TO other_images (JSON array of candidates): [] - Each item has: src_url, local_path, source, score, reason. - Only use http(s) src_url. If src_url is empty or non-http, do not use that image.
The core issue is simple: a single PAT grants the AI agent access to *all* repositories associated with the account. This creates an enormous attack surface. Imagine an attacker gaining control of a developer’s PAT—they could then extract sensitive data from any repository, regardless of its classification or security level. The MCP protocol’s design fundamentally relies on trusting the AI agent, which is precisely what attackers exploit.
Mitigation with Docker MCP Toolkit
Docker’s MCP Toolkit addresses this vulnerability by implementing repository-specific OAuth. Instead of a broad PAT, each repository gets its own unique access token. This granular control significantly reduces the potential damage from a compromised agent. If an attacker gains control through prompt injection, they’re limited to accessing only the data within that specific repository. The toolkit uses a layered approach combining secure token management and restricted access controls.
The Invariant Labs team demonstrated how this can be achieved in their research: by creating a GitHub issue that triggers the AI agent to attempt an unauthorized data extraction. But because of the repository-specific OAuth, the agent was unable to succeed – highlighting the critical difference between a vulnerable setup and one protected by Docker’s MCP Toolkit.
The MCP protocol is not inherently flawed; it’s the implementation that creates vulnerabilities. By leveraging technologies like repository-specific OAuth, organizations can mitigate these risks and build more secure AI systems. This example underscores the importance of carefully considering access control policies when integrating AI agents with sensitive data sources. The MCP Toolkit provides a practical solution for achieving this level of security.
The use of Docker’s toolkit significantly reduces the risk associated with the MCP protocol and allows organizations to leverage the benefits of seamless AI integration without compromising data security. This approach is critical in protecting against prompt injection attacks and ensuring a future-proof AI strategy. The key takeaway here is that you must prioritize granular access controls when working with sensitive data.
Understanding this vulnerability and deploying solutions like Docker’s MCP Toolkit are essential steps for any organization utilizing MCP. It highlights the importance of proactive security measures in the rapidly evolving landscape of AI development.
Source: Read the original article here.
Discover more tech insights on ByteTrending.
Discover more from ByteTrending
Subscribe to get the latest posts sent to your email.










