Researchers described a real-world style attack where text posted in a GitHub issue was treated as an instruction by an AI agent, leading the agent to use a victim’s token to access private repositories. The article also highlights common weak setups in MCP integrations, overbroad permissions, personal tokens, and missing rotation/logging, making it hard for organizations to know what their AI-connected tools can actually access.
Key findings
- Invariant Labs reported an attack pattern where a poisoned public GitHub issue caused an AI agent to follow attacker-supplied instructions and use a victim token to pull private repo data.
- A benchmark (MCPTox) tested 45 live MCP servers and 20 models and measured a 36.5% average attack success rate (72.8% for the worst model).
- Organizations often deploy MCP servers with overbroad permissions and personal/static tokens without rotation schedules or meaningful logs.
- The authors observed that over 20% of MCP-related access policies they reviewed were “broken or missing entirely,” with personal tokens commonly used instead of service accounts.
Who’s being targeted
- Commonly targeted roles: Developers, Platform Engineering, DevOps, Security Engineering, IT Administrators.
- Affected industries: Software development, IT / Platform engineering, Enterprises using AI agents and MCP integrations.
- Attack channels: github.
- Impersonated: A legitimate open-source user/contributor.
Awareness takeaways
- Treat user-submitted text (issues, tickets, Slack messages) as untrusted input, don’t let AI tools execute instructions from it without safeguards.
- Use service accounts and least-privilege scopes for AI integrations; avoid personal/admin tokens for automation.
- Require token rotation and logging so you can prove what AI-connected tools accessed and when.
Red flags to watch for
- Issue text contains unusual instructions directed at an assistant/agent rather than a human
- The request asks for actions outside the issue’s normal scope (e.g., access private repos)
- The workflow relies on a powerful token with broad access rather than a limited service account
Read the video transcript
Imagine a random GitHub issue quietly making your AI agent leak private repo code using your token. Invariant Labs showed this actually works: a poisoned public GitHub issue hijacked GitHub’s own MCP server. The agent read the issue as instructions and used the victim’s token to pull data from private repos, no compromised code, just a description field nobody thought to sanitize. In tests of 45 live MCP servers and 20 models, this kind of attack worked 36 percent of the time, over 70 percent for the worst model. And most setups used overbroad personal tokens, no rotation, and no logs, so no one could even say what the AI touched. Your move: if you own an AI–GitHub integration, swap any personal or admin tokens for a least-privilege service account today, then treat every issue or ticket as untrusted text, not instructions.