A new class of attacks against AI coding assistants shows how malicious Model Context Protocol (MCP) servers can silently siphon SSH keys, environment variables, source code and customer data by splitting exfiltration instructions into innocuous-looking fragments that the agent stitches together and executes as normal work.[1][4][7] Researchers warn that this instruction-splitting technique can succeed even after a blunt data-theft prompt is rejected, because the agent obeys routine tool calls and channel operations that individually appear safe but collectively leak sensitive information.[1][7][8]
The Model Context Protocol standard lets AI agents connect to external tools through named MCP servers that expose only a tool’s name, description and input schema, while hiding the implementation code that actually runs, creating a blind spot security teams cannot easily audit.[1][8] Attackers can register apparently helpful tools whose underlying code chains together routine queries and outputs to infer and extract secrets—such as environment variables, SSH agent sockets, API tokens and configuration files—from the same local context the agent already uses for legitimate development tasks.[1][4][8][12]
This pattern builds on broader “tool poisoning” and prompt-injection threats against AI agents that security researchers have been documenting over the past year, including Cloud Security Alliance research notes on “Agentjacking” and MCP tool poisoning that show MCP servers being abused to exfiltrate credentials and private repositories without any obviously malicious prompts.[4][7][13] Identity and access management vendors have similarly described MCP-based credential theft scenarios where coding agents continue to operate normally while quietly streaming secrets and confidential data to attacker-controlled endpoints in the background.[12][8][13]
Real-world vulnerabilities in popular AI coding tools highlight how dangerous compromised MCP configurations and integrations can become, even when the exploit mechanics differ from instruction-splitting.[2][3][10] A flaw in Amazon’s AI coding assistant tracked as CVE-2026-12957 allowed booby-trapped Git repositories to execute code on a developer’s machine and access cloud credentials by abusing how the product handled MCP server configuration files, earning a CVSS v4 score of 8.5 (HIGH).[2] Anthropic’s Claude Code has also faced a series of issues, including CVE-2026-21852 and related flaws, where opening untrusted projects could trigger information disclosure and code execution paths that expose API keys and other secrets through automated tool initialization.[3] In a separate case, Google’s Gemini CLI vulnerability CVE-2026-12537, rated 10.0 under CVSS v4, turned a third-party service’s download counter into a covert channel for leaking API keys one character at a time, underscoring how easily AI tooling can be bent into exfiltration pipelines.[10]
So far, neither major vendors nor the U.S. National Vulnerability Database have catalogued the instruction-splitting abuse of MCP servers as a standalone CVE, leaving it categorized more as an attack pattern that can be applied across different products rather than a single patchable bug.[1][4][7] Security researchers caution that because MCP servers typically run with the developer’s privileges and often can invoke local shells or other tools, fragmenting exfiltration instructions across tool descriptions, parameter schemas and response channels allows attackers to bypass naïve prompt-safety checks while still achieving full compromise of source code, customer records and cloud environments.[8][13][14]
Defenders are being urged to audit which MCP servers are connected to AI coding agents across their development environments, treating every MCP integration as an untrusted data source—especially any that consume user-controlled or external inputs such as repository content, build logs or CI/CD output.[4][7][8][12] Security guidance from Cloud Security Alliance, IAM providers and independent researchers consistently emphasizes running AI agents in least-privilege sandboxes, restricting file-system visibility, environment variable access and outbound network connectivity so that even a compromised MCP tool yields only limited credential and data exposure.[4][7][12] Organizations should also track and quickly apply patches for known AI coding tool CVEs, while monitoring for abnormal tool invocation patterns and unexplained data flows that might signal stealthy MCP-based exfiltration campaigns targeting developer workstations and build systems.[2][3][10][13]
References
- Malicious MCP Servers Can Split Instructions to Make AI Coding Agents Exfiltrate Secrets
- Amazon Q flaw let booby-trapped Git repos execute code, swipe cloud creds
- Claude Code Flaws Allow Remote Code Execution and …
- Agentjacking: MCP Injection Hijacks AI Coding Agents
- MCP Tool Poisoning: Adversarial Hijacking of AI Agent …
- MCP Server Security: How Malicious Tools Attack AI Agents
- Google, Anthropic, and OpenAI Patch Critical AI Coding …
- How to secure model-agent interactions against MCP vulnerabilities
- MCP and data-injection flaws let attackers hijack AI coding …
- AI Agent Security and MCP Defense Guide | Meta Intelligence
