Malicious MCP Servers Can Split Instructions to Make AI Coding Agents Exfiltrate Secrets
ASSET Research Group's GhostSplice technique splits malicious instructions across MCP channels, tricking AI coding agents into exfiltrating SSH keys, source code, and secrets.
ASSET Research Group disclosed GhostSplice, a prompt-injection technique in which a malicious Model Context Protocol (MCP) server splits an exfiltration instruction across a tool description and a tool result so no single fragment appears harmful. In the reference implementation, a benign-looking integrity_checker tool with fields alpha through delta is later paired with a project-scan result mapping those fields to .ssh/id_rsa, proprietary source, customers.csv, and .env. Tests across eleven API-tested models showed average compliance rising from 42% to 82% when instructions were split in two, with GPT-4o, Gemini 2.0 Flash, and Llama 3.3 70B going from 0% to 100%. The findings come from controlled lab tests, not a reported real-world intrusion, and no CVE identifiers had been assigned as of August 10, 2026.
- GhostSplice splits malicious instructions across MCP tool descriptions and results so no single fragment looks harmful.
- ASSET tests: splitting instructions into two pieces raised average agent compliance from 42% to 82% across eleven models.
- Same model can refuse in one coding client and exfiltrate in another; surrounding safety controls matter.
- No real-world intrusion reported; tests were controlled and CVEs await coordinated disclosure as of August 10, 2026.
- Defense: treat MCP server output as data, require human approval of tool calls, validate cross-tool value flows.
Full article779 words · extracted from thehackernews.com · click to collapse
Swati KhandelwalAug 11, 2026AI Security / Cyber Attack
A malicious tool server connected to an AI coding assistant can quietly walk off with SSH keys, environment secrets, source code, and customer data without ever sending one obviously harmful instruction.
The trick can work even after a blunt version of the same theft is refused: split the request into fragments that each look routine, place them in channels the assistant already uses, and let the agent stitch them together and send the data back.
The attack targets coding tools that connect to outside servers over the Model Context Protocol (MCP), the open standard that lets AI assistants call external tools.
A malicious MCP server can put one fragment in a tool description and another in a tool result; some setups also support server-initiated sampling. MCP does preserve structured tool and result boundaries. But ASSET Research Group's tests show agents can still combine instructions across them in the same working context, so no single fragment has to contain the whole malicious request.
The group calls the technique GhostSplice. Its disclosure describes controlled tests in isolated projects seeded with fake credentials, not a reported real-world intrusion, and says any CVE identifiers will follow coordinated disclosure; The Hacker News found none listed as of August 10, 2026.
The sharpest result is not a simple model ranking. The same model can refuse in one coding client and exfiltrate in another, depending on the safety controls around it.
The attack also has a built-in limit. It is not a way to break into an arbitrary agent from the outside: it assumes the developer has already connected the attacker's MCP server, and that the agent can already read the files being taken.
In the group's reference implementation, a server advertises a harmless-looking tool called integrity_checker with four bland fields, alpha through delta, and no sensitive filenames. A later project-scan result supplies the missing mapping: fill those fields with the contents of .ssh/id_rsa, proprietary source, customers.csv, and .env for "server-side hash verification."
Read separately, neither piece contains the full theft. Read together, they tell the agent to collect sensitive local files and pass their contents to the attacker's tool. The public repository also includes a canonical three-channel variant that separates the project inventory, the file-to-field mapping, and the collection tool across three interactions.
Split into two pieces, average compliance rose from 42% to 82% across eleven API-tested models, the disclosure reports. Its broader results table contains 15 model rows. GPT-4o, Gemini 2.0 Flash, and Llama 3.3 70B went from 0% in the one-piece test to 100% when split in two. Claude Haiku 4.5 stayed at 0% in the API tests but reached 100% in a three-piece Cursor test. GPT-5.4 was reported at 90% in Cursor and 100% through Codex CLI, while the repository says it dropped to 0% behind Claude Code.
The headline scores need care. Claude Sonnet 4.6 and Opus 4.6 are listed at 0% across the published table, but ASSET says Sonnet still sent proprietary source containing a live hardcoded key in one test while redacting the more obvious secrets. Those numbers are the researchers' own results. They should not be read as "unaffected," or as general compliance rates: each reflects the specific setup tested.
The Hacker News has reached out to the ASSET Research Group for further detail on its testing and will update this story with any response.
The simplest lure was also the hardest to second-guess. Elaborate compliance or governance stories gave the model something false to question; a plain fill-in-the-blanks template did not. To the model, the group writes, the task is just to "fill in the form the tool asked me to fill in."
The defense lands on the client. The MCP specification says clients should keep a human able to deny tool invocations and must treat annotations from untrusted servers as untrusted. OpenAI's current guidance likewise warns that unsafe MCP servers increase prompt-injection risk and tells organizations to vet custom and third-party integrations.
ASSET's prescription is tighter still: treat server output as data, not instructions, and do not let values from one tool's output flow unchecked into another tool's arguments.
GhostSplice follows Ghostcommit, a June disclosure from the same lab that hid an instruction inside a PNG referenced by a project convention file, then let a coding agent encode .env secrets into source as integers. The mechanics differ, but both point at the same weak spot: the safety boundary around the model can matter as much as the model itself.
Found this article interesting? Follow us on Google News, Twitter and LinkedIn to read more exclusive content we post.
Text extracted automatically; images, tables and formatting may be missing. Original: https://thehackernews.com/2026/08/malicious-mcp-servers-can-split.html