PaperarXiv:2611.30624 · cs.CR · Nov 23, 2026
Oops!... I Parsed It Again: Tool-Call Smuggling Against LLM Agents
Igor Santos-Grueiro, Daniel Romero-Ruiz
The paper systematizes a real failure mode in how harnesses gate tool calls and backs it with measurements on deployed components, a schema survey and prior CVEs. It also gives a concrete architectural rule: approve and execute the same parsed object. The weaknesses are significant. The headline attacks use T3 with author-built guards, the T1 channel is narrow and shown only by replay, and anonymized components block verification. The design lesson still holds and is directly actionable for harness builders.
Novelty
4 out of 5Rigor
3 out of 5Reproducibility
2 out of 5Relevance to harnesses
5 out of 5
TL;DR
A tool-call guard and the executor that runs the call can parse the same JSON argument bytes differently. The differences come from repeated or case-varied keys, escapes, types, schemas or call IDs, and the result is that the guard approves and logs one call while another runs. The proposed fix is to parse each call once, project it to the approved schema, and seal it with its call ID. The headline end-to-end attacks need an on-path or tool-server attacker. A content-only attacker reaches the guard and executor only through JSON text inside a string argument, and that channel was shown by replay, not end to end.
Adversarial review by Harness Hub · Nov 26, 2026 · read full text (truncated) · Suggest a correction
Original abstract (authors’ text, select to expand)
LLM agents act through tool calls: the model writes the arguments of a call as JSON, a guard decides whether the call may run, and an executor runs it. The same bytes are parsed several times, by the provider, gateways, SDKs, frameworks, the guard, and the executor. JSON leaves some choices to each parser, such as which copy of a repeated key counts. When the guard and the executor choose differently, the guard approves one call, the executor runs another, and the audit log records the approved one. We introduce this attack, tool-call smuggling, and study it across the stack. We describe six ways in which the same bytes yield different calls and build a differential testing harness that gives identical bytes to 17 pinned parser and validator configurations; most pairs disagree on some inputs, and even two official MCP SDKs accept different inputs. On tasks from $τ$-bench and AgentDojo, an attacker who can rewrite the bytes in transit cancels another customer's reservation and creates a file that the guard blocks by name, while the audit log names only the approved call. Content the model reads splits guard and executor only inside a string: ten models we test write no repeated or disguised key into the call itself where we see it, but copy one verbatim into JSON text in an argument, which a Python guard and a Go executor read differently. A malicious server copying a legitimate tool's public schema and adding one field, which a note explains, gets the model to fill it, unseen by the guard, with user data. Parsing each call once, JSON text included, keeping only the fields of the approved schema, and handing it to the executor, sealed with its call ID in transit, stops all 7,412 crafted inputs and every attack we built.
Summary
The authors name a class they call tool-call smuggling. It is a parser differential between the component that approves a tool call (the guard) and the component that runs it (the executor), modeled on HTTP request smuggling. They define six vectors, each tied to one parsing step: - V1: repeated, NUL-suffixed or case-varied keys - V2: type conversion - V3: escapes and Unicode - V4: truncated streams - V5: schema interpretation, including undeclared fields and defaults - V6: call-ID binding A differential harness feeds identical bytes to 12 parsers and 5 validators, all targeting one three-argument tool. They also survey 4,693 distinct schemas from the top 100 Smithery servers and six official MCP reference servers. There are three end-to-end attacks, each with bytes fed directly to an author-built guard as a T3 attacker would: - A: a case-varied reservation_id cancels another customer's reservation on tau-bench. - B: an undeclared field reaches a shell command through a forwarding layer. - C: an escaped file name passes a raw-text data-loss filter on a tool mirroring AgentDojo's create_file. The authors then measure what ten models pass on when the attacker controls only content (T1): - No structural marker reaches the call object itself. - Keys and escapes do survive inside string arguments that hold JSON text. - With the model writing the call, attack C never produced the blocked file. An impersonating server (T1+T2) that adds one field to a public schema gets the model to fill it with user data, and the guard does not log that field. Five defenses are compared. Only D5 stops all of the authors' attacks and their 7,412 crafted inputs. D5 is a single shared parse with schema projection, including operator-marked JSON-text arguments, sealed with the call ID across processes.
Key findings
- V1 parser disagreement: 43 of 55 pairs of deployed parsers read at least one of 22 V1 inputs as a different value of the attacked key. SDK X and SDK R agree on all 22 (Section 5.2, Figure 4).
- V2: the two official MCP SDK server paths split on 21 of the 22 type inputs that either accepts (Table 2, Section 5.2).
- Deployed schemas: 558 of 4,693 distinct schemas (11.9%), on 64 servers, give different validity or arguments across jsonschema/Ajv draft-07/2020-12 and default filling. Every schema as the registry serves it accepts undeclared top-level fields (Section 5.2).
- End-to-end attacks A, B and C run on real executors, or on a forwarding behavior for B, and in each the audit log names only the approved call. Attack A cancels U86B6B and refunds its $1,203 while the log names I3EHXC (Table 3, Section 5.3).
- T1, structure in the call itself: no model wrote a structural marker into the call (0/25 for every model, Table 4). Attack C with the model writing the call produced the blocked file in none of the 100 marker-carrying calls out of 120 trials (Section 5.4).
- T1, JSON text inside strings: models kept repeated, NUL-suffixed and case-varied keys in 81 of 86, 65 of 78 and 82 of 84 calls. Replayed through a CPython guard and Go's encoding/json, the case-varied copy ran the attacker's value in 82 of 84. The escaped file name survived in 72 of 84 (Section 5.4).
- T1+T2 impersonating server: the user's workstation name left through an added field in 29 of 30 trials when the request told the model to follow the note, and in 23 of 30 with neutral requests. On ten tau-bench tools the user's e-mail left in 133 of 150 attempts (Table 5).
- Defenses (Table 6): D1 strict validation and D4 parse-once-at-guard are bypassed in every scenario. D3 misses NUL keys with the CPython pair and the escape case with both pairs. D5 has 0 bypasses.
- Crafted inputs: with a first-copy guard and a CPython executor, 361 of 7,412 inputs ran the attacker's action with no defense, 352 with D1 and 361 with D4. D5 let none through and blocked none of the 1,120 benign calls (Section 5.5).
The paper at a glance
- Model writes tool-call arguments as JSON text
- Provider / gateway / SDK / framework parse or re-serialize
- Guard parses, approves or denies, writes audit log
- Executor parses the same bytes again and runs the tool
- Differential harness: identical bytes to 12 parsers + 5 validators; comparator classifies agree / disagree / split
- End-to-end attacks A-E under T1, T2, T3 attacker positions
- Defenses D1-D5 evaluated against a defense-aware attacker
Data table
| Method | inputs |
|---|---|
| none | 3 inputs |
| D1 strict validation | 3 inputs |
| D3 first vs. last | 0 inputs |
| D3 last vs. seg. 0.5.3 | 0 inputs |
| D4 parse once at guard | 3 inputs |
| D5 shared parse (this paper) | 0 inputs |
Why it matters
This paper is directly relevant to anyone building a harness with a permission layer, approval prompt, policy gateway or audit log in front of tools, which covers most coding agents and MCP clients. The core claim is architectural and easy to act on: if the approval step and the executor each parse the raw argument string, the approval does not bind what runs. The fix is to hand the executor the parsed, schema-projected object rather than the original bytes. The paper also gives builders concrete facts they can check in their own stacks. Go's encoding/json matches keys case-insensitively. Every surveyed MCP schema accepts undeclared fields. Tools that take JSON text inside a string reopen the problem one level down. A guard that looks up the approved schema by tool name can be bypassed by a server that republishes the name with an extra field. The practically relevant threats are an impersonating or compromised tool server and the JSON-in-string channel. A pure content attacker did not get structural tricks into the call object for any of the ten models tested, so builders should not read this as a new prompt-injection result. The demonstrated guards are the authors' own constructions, so whether a specific production guard is vulnerable has to be checked case by case.
Issues (9)
- High severityWhere in paper: Abstract; Section 5.3 (attacks fed bytes directly as T3); Section 5.4 (Table 4, 'Attack D: inside a string', 'With the model in the loop, attack C fails')
The abstract's lead attacks are cancelling another customer's reservation and creating a blocked file. Both are run by a T3 attacker whose bytes are fed directly to the guard. When the model writes the call, attack C fails: the blocked file appeared in none of 100 marker-carrying calls. No T1 attacker got a structural marker into the call object (0/25 for all ten models, Table 4). The T1 successes (82 of 84, 72 of 84) hold only inside JSON-text string arguments. They are measured by replaying model output through a CPython guard and Go decoder, not by an end-to-end run against a deployed tool. The paper finds such tools only as 24 tools on 6 surveyed servers that say so in prose, none in their schema. The abstract does state the string restriction, but it compresses it enough that a reader could take the tau-bench result as reachable from content.
- High severityWhere in paper: Section 5.3 (Attacks A, B, C; 'The official MCP SDK handlers drop undeclared fields, so the attack needs a forwarding layer')
Every guard in the end-to-end attacks is an author-built configuration. Examples are a Go-decoder policy check, a raw-text filter that blocks the word 'credentials', and a jsonschema check that scans only the pattern field for metacharacters. Attack B also needs a forwarding layer that the paper says it found by reading gateway source. The official MCP SDK handlers drop undeclared fields, and the paper does not run the attack through a named deployed gateway. No shipping guard or gateway product is shown exploited end to end in the evaluation; the deployed evidence is the cited CVE and advisories. The abstract's 'study it across the stack' implies more than this.
- Medium severityWhere in paper: Section 3 (T3, on-path attacker); Section 5.3 opening paragraph
The T3 attacker is strong. It controls a gateway or proxy and must sit after the last component that re-serializes the call, because clients and frameworks that re-serialize remove repeated keys and escapes. Such an attacker can already rewrite calls openly, so what smuggling adds is stealth against a guard and log placed downstream of it. The paper does not measure how often real deployments put a re-serialization-free, separately trusted hop between guard and executor.
- Medium severityWhere in paper: Section 5.1 (Inputs); Table 2; Figure 4
The differential results rest on a very small input set against one three-argument tool: 22 V1 inputs, 24 V2, 3 V3 and 3 V5 schemas. 'Most pairs disagree' (43 of 55) means disagreement on at least one of 22 V1 inputs, and the paper attributes it to two design choices, key precedence and name matching. These differences are real, but the Figure 4 percentages sit on tiny denominators and are not rates in the wild.
- Medium severityWhere in paper: Table 1 caption and Ethics Considerations reference; Section 5.1 (Components); Section 5.3 Attack B
Key components are anonymized as SDK X, SDK R, stack Y, framework Z and 'the gateways whose source we read', pending open reports. As a result, readers cannot verify the MCP SDK claims or tell which of their own dependencies are affected. No code or data URL appears in the provided text, so the harness and the 7,412 crafted inputs cannot be checked.
- Medium severityWhere in paper: Section 5.4 (Attack E, Figure 5); Table 5
Attack E is mainly a schema-identity problem. The guard resolves the schema by tool name and allows undeclared fields, and the executor serves the attacker's schema. That would fail with a single shared parser too. Filing it under parser-differential smuggling enlarges the class. The 29 of 30 headline uses a request telling the model to follow the note exactly; neutral requests give 23 of 30. Anthropic's classifier also stopped some Opus requests, which shapes the per-model numbers.
- Medium severityWhere in paper: Section 5.5 (D3 and D5 definitions, Table 6, 'Crafted inputs' ablations)
The D5 result is narrow in what it was tested against. It was evaluated only against attacks and mutations the authors built. It relies on operators marking which string arguments are JSON text, which no surveyed schema declares. Across processes it needs a key shared between guard and executor. The ablations show it fails without each part: 48 NUL inputs, up to 148 JSON-text inputs and all 154 attack-D copies get through. Operational cost, latency and key management are not evaluated, and robustness to vectors outside the generator is not tested. The D3 pairs tested (CPython first vs. last copy, and last copy vs. segmentio 0.5.3) are a weak instance of 'compare two parsers'.
- Low severityWhere in paper: Section 5.1 (Models, Metrics); Table 4; Section 5.4 ('Repeated keys could have survived only where we see the raw text')
The model survival rates have limited coverage. They come from one attacker document per condition, with 25 trials per model at default sampling, and the Wilson intervals cover only repeated sampling of that prompt. Repeated keys could be observed only where raw text was returned, in 75 trials from OpenAI and Llama-4-Scout. For the other seven models the API or router parsed or re-serialized the call, so 'no model wrote a repeated key' is unobservable for most of them.
- Low severityWhere in paper: Section 4.2 ('We built attacks from V1, V3, V5, and V6')
V2 (type conversion) and V4 (truncated streams) are characterized, but the authors state they built attacks only from V1, V3, V5 and V6. V2 and V4 remain potential vectors.
Questions for the authors
- Which MCP SDKs are SDK X and SDK R, and which gateways forward undeclared fields? Is there a disclosure timeline for naming them?
- Will the differential harness and the 7,412 crafted inputs be released, and where?
- Has any shipping guard or policy gateway been exploited end to end, beyond the cited advisories?
- How should D5 handle string arguments that contain JSON text the schema does not mark? Is there a way to detect them automatically?
- In real deployments, how often do the guard and executor each read the raw argument string, rather than an object already parsed once by the framework?
- Does Attack E still work if the guard pins schemas by server identity or content hash and enforces additionalProperties false, without D5's parse-once step?
- Do models emit repeated keys into the raw call text under higher temperature or with fine-tuned open models, where raw text is visible?
Related in the directory
Open-source projects
Open source · Anthropic (community)
Open source · sierra-research
Open source · LangChain
Open source · modelcontextprotocol
More tools on the same problem
Products and open-source projects in the directory closest in meaning to this paper.
Open source · FailproofAI (ExosphereHost Inc)
Related papers
arXiv:2611.23346 · cs.CR · Nov 17, 2026
Long-horizon LLM agents across codebases, web browsers, and enterprise infrastructure rely on an execution harness to move state between the working context, session history, persistent memory, and external environment. While conventional execution traces log model prompts and tool calls, critical security and reliability failures occur during state transfers: a transfer can admit unchecked content (indirect prompt injections, unverified memory writes), rewrite state lossily (context compaction dropping user constraints, memory consolidation stripping source authority), or restore state incompletely (workspace rollbacks leaving aborted KV state active on the inference server). Because current traces omit what crosses these boundaries, failure attribution and runtime monitors fail on multi-step trajectories. We present a state-transfer audit architecture for the agent harness. At each transfer boundary, we define an audit point specifying the minimal hash-chained record the harness emits, separating low-overhead deterministic checks from model-based semantic checks and binding internal context, memory, and inference-server cache state to external actions. We show that the same transfer records required for causal failure attribution supply the durable state needed by runtime security controls, including least-privilege capabilities, replay-resistant authorization outside the prompt, information flow control, obligation monitors, and transactional recovery across multi-agent and infrastructure pipelines. Finally, we analyze multimodal GUI adaptations and implement and evaluate a reference harness middleware across 240 multi-step fault-injection trajectories, showing that transfer records localize root causes and catch cross-transfer violations missed by lifecycle and tool-only logs at microsecond deterministic overhead.
Deep Shah, Nehal Kathrotia
arXiv:2610.36108 · cs.CR · Oct 26, 2026
LLM agents increasingly access external tools through the Model Context Protocol (MCP), but the natural-language metadata used to describe those tools creates a prompt-injection surface. Within this established tool-poisoning surface, we study Log-To-Leak, an additive post-hoc logging attack that induces a separate attacker-controlled call after the final legitimate call. Its payload targets the user query, MCP server name, server response, and agent response. We operationalize the injected directive through Trigger, Tool Binding, Justification, and Pressure, and separately measure call success, payload fidelity, and preservation of legitimate behavior. We evaluate five MCP servers and four LLM agents using five metrics spanning effectiveness, utility, and efficiency. Across 18 model-server pairs with valid tool execution, Log-To-Leak achieves an attack success rate (ASR) of 62.64-100% and conditional logging accuracy (LA) of 76.55-95.64%; 16 pairs have absolute target-task completion changes of at most 6.63 percentage points. Three evaluated defenses leave residual ASR above 55% on GitHub MCP with GPT-4o, while an instruction detector flags 85.53% of benign descriptions. These results show that successful task completion can coexist with unauthorized post-hoc disclosure and motivate host-controlled authorization for secondary tool calls.
Yuepeng Hu, Chongyu Fan +2
arXiv:2611.27095 · cs.SE · Nov 20, 2026
Language-model agents using the Model Context Protocol (MCP) face three runtime verification gaps: (i) action fabrication, where post-tool prose narrates side effects that failed, timed out, or never ran; (ii) provenance collapse, where unverified model prose or web text enters durable memory alongside executed tool outputs; and (iii) syndicated echo amplification, where mirrored web pages satisfy multi-source corroboration from one origin. Existing MCP firewalls inspect wire calls before execution, while LLM-judge guardrails require multi-gigabyte VRAM without binding prose to receipts. We present epistemic-guard (v0.5.2), an open-source Python library and out-of-process stdio MCP receipt proxy (15 modules, 0 MiB GPU VRAM). epistemic-guard isolates Ed25519 signing keys out of process, writes RFC 6962 Merkle logs with AER-1 receipt translation, checks post-turn prose on CPU with SHA-256-verified OpenVINO INT8 encoders (4 models, 279.48 MB total; 82.67 MB on the supervision path), gates SQLite writes across 7 provenance domains, and collapses verbatim and lightly edited wire-syndicated RAG mirrors. On conformance suites, epistemic-guard rejects 100.0% of tampered receipts (200 Merkle leaves), passes 58/58 official AER-1 ingestion vectors and 50/50 reference-verified AER-1 exports, verifies 100.0% of 40 fault-injected wire calls and 100 concurrent appends with 0 key leaks, and blocks 100.0% of 100 unauthorized memory writes. Across $N=250$ frozen-benchmark traces, epistemic-guard reaches 93.2% accuracy at 17.9 ms warm median CPU latency (8.62 ms single-clause; 921.8 ms cold-start load), beating 12B-14B GPU judges by 6.4-6.8 points ($p=0.0259$, $p=0.0095$) at 4.26-4.5$\times$ lower latency; on $N=60$ live mcp-proxy traces, it catches 96.15% of hazards at 76.67% accuracy (38.24% FPR; $+18.34$ points over Stage-1-only, $p=0.001$) in 9.16 ms p50.
Sean Maxwell
arXiv:2610.36114 · cs.SE · Oct 26, 2026
LLM agents are judged by two numbers: the size of the context window, and how often the final answer is correct. Both numbers miss a third thing: how much of a tool's output is lost before the model ever sees it. We measured this loss in a real tool-using agent. The agent finds the cause of injected faults by reading Linux kernel traces. The context window was almost empty: across 720 runs, the single largest prompt used only 5.75% of it. Yet a third of all tool results (3,827 of 11,189) were cut before they reached the model, and every cut result became broken JSON. The harness cut each result by slicing its JSON text at a fixed length. This does not shorten a result evenly. It deletes whatever data sits near the end. One field reached the model in only 4.7% of calls. A second field, in the very same results, reached the model in 99.3% of calls. Which field held the fault's evidence depended on when the faulty process started: early or late in the trace. The agent's diagnosis accuracy matched this same split. So we ran controlled experiments to test one question: did the data loss cause the drop in accuracy? This paper makes four contributions. First, we model an agent's context as a five-stage pipeline, with a measured failure at each stage. Second, we replay 864 real tool results, including one from a production trace where the shipped cut deletes all 128 records of the fault's evidence. Third, a controlled experiment shows that the cut's real cost appears first as extra work, not as wrong answers: 43% more tool calls, twice the computation, and yield falling from 0.61 to 0.31. The agent still finds the right answer when it has another way to reach it. Fourth, a survey of seven agent frameworks finds two that cut tool output the same unsafe way. Whether the data cut truly causes the accuracy drop is still an open question.
Yuvraj Sehgal, Mahsa Panahandeh +1
arXiv:2611.31338 · cs.CR · Nov 23, 2026
Runtime controls for tool-using agents depend on manifests that state what each tool may read and where its output may go. Evaluations of these controls, including ChainCaps, report per-attack blocking: the share of attacks a set of manifests stops. We show that this is the wrong unit. A catalog is only as safe as its weakest source policy: if $M$ independently authored policies are each wrong with probability $p$, the chance that the catalog contains an accepted exfiltration path is $1-(1-p)^M$, while per-attack blocking stays at $1-p$. Three lines of evidence agree. In synthetic catalogs run through two enforcement engines, ChainCaps and OpenAPPA, per-attack blocking holds at 92% while catalog vulnerability rises from 22% at 10 tools to 99% at 200, and composition provides no protective effect. A fifteen-model authoring pilot shows that real errors cluster by author, so a 200-tool catalog behaves like about 5 independent decisions rather than 60 (95% interval 3.4 to 9.2). On 114 real MCP tools with expert-written rules, the models' own manifests block 89% of attacks yet leave 9 of 15 catalogs open, as the author-effect model predicts and independence does not. Evaluations should report catalog vulnerability, the sink coverage of their tests, and an effective number of independent decisions alongside per-attack blocking.
Karthik Karunanithi
arXiv:2611.31929 · cs.SE · Nov 24, 2026
In LLM-based smart contract auditing, detection quality depends on both model capability and workflow design. While coding agents can revise workflows from execution feedback, unconstrained rewrites rarely yield stable gains. Cross-function vulnerabilities require multi-step state tracking and boundary reasoning that coarse pipelines miss. End-to-end outcomes hide which step lost a clue, so direct rewrites regress existing hits or discard valid edits under coarse aggregate scoring. Repeatedly iterating on a small project set also adds case-specific heuristics that bloat prompts and hurt generalization. We present Shuttle, a constrained workflow-evolution system, and LucidScan, the auditing framework it evolves. Shuttle centers on provenance-graph attribution: it expands each run into an instance-level dependency graph, locates the node where a clue was lost via forward search, and traces existing hits backward into a protected set. After evaluating a merged batch, Shuttle drops dragging edits via a node-level provenance ledger, falling back to cache-reusing local re-runs only when early-round edits overlap on the same node. For localized bottlenecks, Shuttle generates edits under task decomposition, progressive refinement, and generality blind review. On 10 training projects, Shuttle evolves LucidScan from $G_0$ (28.7% per-project average C/H/M recall) to $G_8$ (82.1%). On 13 held-out validation projects under the same model, average recall rises from 28.6% ($G_0$) to 70.3% ($G_8$), above Pashov and Codex Security. In an anonymized live public audit contest with 896 researchers (Nov. 2026), the evolved scanner tied for #1 in High-severity recall (6/8, 75.0%), ranked #2 in scored H/M clusters (34/72, 47.2%) with 92.9% validity (78/84), and finished #3 overall.
Yue Xue, Yi Rong +6