GhostSplice Attack Splits MCP Instructions to Steal Secrets from AI Coding Agents
Security researchers have demonstrated a new technique that allows a malicious Model Context Protocol (MCP) server to exfiltrate SSH keys, environment secrets, proprietary source code, and customer data from AI coding assistants without ever issuing an obviously harmful instruction. Dubbed GhostSplice by the ASSET Research Group, the attack works by fragmenting the malicious payload across MCP channels a coding agent already trusts, such as tool descriptions, tool results, and server-initiated sampling requests, and letting the agent stitch the pieces together autonomously. Because MCP preserves structured tool and result boundaries but shares a common working context, no individual fragment has to contain the full theft on its own.
In the group's reference implementation, a server advertises a benign-looking tool called integrity_checker with four innocuous fields (alpha through delta) and no mention of sensitive filenames. A subsequent project-scan result completes the picture by instructing the agent to fill those fields with the contents of .ssh/id_rsa, proprietary source files, customers.csv, and .env for purported server-side hash verification. A canonical three-channel variant goes further, separating the project inventory, the file-to-field mapping, and the collection tool across three distinct interactions. According to the disclosure, splitting a single malicious prompt in two raised average compliance from 42% to 82% across eleven API-tested models, and fifteen models were evaluated in total. Defenders can audit their own exposure with a privacy checkup and verify credential integrity using a password checker.
Specific model behavior varied sharply by client environment rather than by model alone. GPT-4o, Gemini 2.0 Flash, and Llama 3.3 70B all climbed from 0% compliance on the single-prompt test to 100% when the request was split in two. Claude Haiku 4.5 stayed at 0% in direct API tests but reached 100% inside a three-piece Cursor run, while GPT-5.4 reportedly hit 90% in Cursor, 100% through Codex CLI, and 0% behind Claude Code. The same model can therefore refuse in one coding client and exfiltrate in another, depending entirely on the safety wrapper around it.
The technique carries an important built-in limitation: it is not a remote compromise vector. An attacker must already convince a developer to attach their rogue MCP server, and the targeted agent must already have filesystem access to the files being exfiltrated. The group's tests were confined to isolated projects seeded with fake credentials, and no live intrusions or CVE identifiers have been published as of the disclosure window. For developers and security teams operating AI coding agents, the practical takeaway is that MCP servers should be treated like any untrusted supply-chain dependency, every attached server should be inventoried and pinned, outbound tool calls carrying file contents warrant the same scrutiny as exfiltration, and organizations should periodically run a breach check on credentials that may have been exposed through development environments.