Manuscript Offprint

arXiv:2611.06585

Signed, Sealed, Leaked: Trust Beyond Signature for MCP Toolchains

Yichiet Aun, Mohammed A. Alhartomi, Jing Jie Tan, Waqas Nadeem, Adeb Salh, Shankar Karuppayah, Sin Chee Tan

Aun Yichiet, Mohammed A. Alhartomi, Tan Jing Jie, Waqas Nadeem, Adeb Salh, Shankar Karuppayah, and Tan Sin Chee

Abstract—AI agents rely on third-party tools, such as Model Context Protocol (MCP) servers, whose publishers can be authenticated and whose execution can be restricted by runtime security policies. Yet authenticity does not guarantee benign behaviour: a legitimately signed tool may perform its advertised function while concealing malicious code that leaks confidential information. We demonstrate this trust failure with a signed MCP tool that embeds sensitive data in requests to a policy-allowed destination. Meta's MCPGuard-Dynamic, a state-of-the-art runtime defence, blocks a direct exfiltration attempt in the same run, yet fails to prevent this attack in every trial. We introduce germline execution, which limits information disclosure without inspecting or trusting tool implementations. Each tool invocation runs in ephemeral copies forked from a data-free germline process, each receiving only information authorised for its destination. Even if malicious code executes, what it can disclose is bounded by the data available to its copy. Under explicit assumptions on copy confinement and a data-free germline, we prove sink noninterference for every signed release and, for releases deterministic within our replay model, show that a verified witness establishes a flow violation. Across 153 attack runs, no unauthorised disclosure was detected under germline execution, compared with 5.9–74.5% of runs under baseline defences and an ablation. Invocations served by a single copy completed in 10–49 ms, 2–28× faster than restarting the tool for every invocation, the conventional way to clear state. These results show that data-isolated execution protects agent toolchains against malicious code concealed within authenticated software.

Index Terms—AI agents, Model Context Protocol, software supply chain, code signing, information-flow control, noninterference, sandboxing, Trojans.

I. INTRODUCTION

AI agents now act by calling tools. Through the Model Context Protocol (MCP) [1], tool calls have become the new API layer of software: an agent hands a user's documents, databases and messages to third-party tools that run as long-lived processes next to it. Ecosystems trust these tools through code signing and pinned publisher keys, from TUF-style metadata [2] and Sigstore [3] to signed agent-skill catalogues [4]. A signature, however, proves only who published the exact bytes, not what the bytes do once they run. Malicious code can therefore be embedded inside a trusted, signed tool: the tool does its advertised job while a hidden routine, like a Trojan, leaks the user's data. This is not hypothetical. The XZ backdoor [5] showed that maintainer-signed releases can carry hidden code, and agent tools show the same pattern in skill backdoors [6], exfiltrating MCP servers [7] and backdoored copies of legitimate agent extensions [8].

Runtime defences go beyond the signature: confinement such as AgentBound [9] and MCPGuard-Dynamic [10] limits the files and destinations a tool may reach, and agent information-flow control (IFC) such as FIDES [11] and CaMeL [12] labels tool replies. Neither is designed for a Trojan in the tool's own code that slips stolen data into a request to a destination the tool is allowed to use, by carrying data across calls or mixing the items of one call.

Even the state-of-the-art defence misses it. We ran Meta's MCPGuard-Dynamic, a recent open-source kernel-level defence for MCP tool calls, with least-privilege policies for a six-call session over HR, board, finance and public items. In its strongest evaluated configuration (per-call policy enforcement with its eBPF controls active), its egress control works as designed: in the same run, a raw-socket transfer to an unlisted host is blocked in every trial. Yet a signed release of an OCR tool, pool, keeps items from earlier calls and discloses them inside the next request to the authorised OCR destination, in every trial and under all seven MCPGuard configurations; smuggle does the same with permitted files the call did not need (Table I). For pool, no disclosure was detected under germline execution, the mechanism we propose; smuggle is measured in our scripted matrix. The pattern holds beyond these releases: across 91 variants we generated, an egress allowlist of this class stops all 71 that send to an attacker-owned host but none of the 20 that send to a policy-allowed host (Section VII-C). This marks the boundary of destination-based confinement, not an implementation flaw: MCPGuard decides where a process may send data and does not promise item-level information-flow control. Because the attack needs nothing more than publishing a signed tool or update, a signed Trojan is one of the most direct ways to attack an agentic AI system.

Invocation purity. Per-call output labelling relies on what we call invocation purity: what a call sends to a destination depends only on data that destination may see. Destination-based confinement relies on it as well whenever its destination policy is taken as assurance that each destination receives only items it may see. A long-lived tool process violates it by carrying state across calls (pool) or mixing items of different

Aun Yichiet, Waqas Nadeem and Adeb Salh are with the Faculty of Information and Communication Technology, Universiti Tunku Abdul Rahman, Kampar, Malaysia (e-mail: aunyc@utar.edu.my; waqas@utar.edu.my; adebali@utar.edu.my). Corresponding author: Aun Yichiet.

Mohammed A. Alhartomi is with the Department of Electrical Engineering, University of Tabuk, Tabuk, Saudi Arabia (e-mail: malhartomi@ut.edu.sa).

Tan Jing Jie is with the National University of Singapore, Singapore (e-mail: tanjingjie@nus.edu.sg).

Shankar Karuppayah is with Bitranger and with CYRES, Universiti Sains Malaysia, Penang, Malaysia (e-mail: shankar@bitranger.io).

Tan Sin Chee is with ABLEs, Malaysia (e-mail: sc@ables.com.my).

TABLE I

(A) SINGLE-HARNESS COMPARISON: TRIALS WITH A DETECTED DISCLOSURE OUT OF 3 (CANARIES PER TRIAL). “3/3 (2)” DISCLOSED; “0/3” PREVENTED; “0/3°” PAYLOAD INACTIVE (SENDS NOTHING EVEN WITHOUT ENFORCEMENT); C-FULL: MCPGUARD'S PROXY. POLICY AND eBPF; C-FULL-PERCALL: POLICY RE-APPLIED PER CALL; BENIGN COMPLETES 6/6 CALLS EVERYWHERE. MCPGUARD COLUMNS RUN EACH VARIANT IN MCPGUARD'S TOOL FORMAT, THE OTHERS OUR RELEASE; ONLY THE POOL ROW IS MATCHED. (B) MCPGUARD'S OWN RUNNER, ALL SEVEN CONFIGURATIONS (3 TRIALS EACH, 105 RUNS); CONFIGURATIONS WITH IDENTICAL RESULTS ARE GROUPED.

VariantSig+PinConfined +IFCC-fullC-full-percallGERMLINE
pool3/3 (2)3/3 (2)3/3 (2)3/3 (2)0/3
smuggle0/3°0/3°3/3 (3)3/3 (3)0/3°
direct3/3 (3)0/30/30/30/3
launder_text3/3 (1)3/3 (1)0/3°0/3°0/3
benign0/30/30/30/30/3
(b) MCPGuard configurationsbenigndirectpoolsmugglelaunder_text
C0, C-AB, C-app (no eBPF)0/33/3 (3)3/3 (2)3/3 (3)0/3°
C-ebpf, C-full, C-AB+ebpf, C-full-percall (eBPF)0/30/33/3 (2)3/3 (3)0/3°

clearance within one call (smuggle; Section II-C).

Germline execution. Instead of judging whether a tool's code can be trusted, our mechanism controls what data the code can see. Every call runs in disposable copies of the tool, forked from a clean germline process that never holds user data, and each copy receives only the data its destination may see; the copies are discarded after the call. Hidden code still runs, but it has nothing to leak: whatever it sends to a destination, that destination was already allowed to see. Formally, the mechanism enforces one invariant from outside the tool: a request to a destination depends only on the items that destination is cleared to see in the current call, on state kept for its clearance horizon, on replies it may receive and on public inputs. Before the tool runs, a Plan step groups the consumers and declared destinations by the items each may see, its view, and the germline forks one sandboxed copy per group. Groups follow declared destinations, so which copies exist never depends on secret data, and state crosses calls only through per-horizon slots held outside the copies. Prevention rests on these copies alone; a separate evidence layer of twin copies and verifiable witnesses exposes releases whose requests diverge, and a dampening policy adapted from BGP route-flap damping [13] suppresses repeat offenders. We build on secure multi-execution [14] and per-request state reset [15]; Section II-D states what is new when the adversary is the signed tool itself.

Contributions. This paper makes three contributions.

  • The gap. We identify invocation purity as the assumption behind per-call output labelling and behind item-level readings of destination-based confinement, separate its two failure modes, and demonstrate both against MCPGuard-Dynamic (Sections II-C and VII-B).

  • Germline execution and its guarantees. Under stated confinement and data-free-germline assumptions we

Signed release r (one exact package version)

Figure

Fig. 1. A valid signature proves who published the bytes, not what the bytes do. Each field stands for one part of a signed release; the hatched field is a hidden routine inside ocr_pdf that stashes input from earlier calls and appends it to the next authorised request, and the Ed25519 signature covers it exactly as it covers every other field.

prove sink noninterference for every signed release and output labels that cover stored state; a verified witness proves a flow violation for tools deterministic within the replay model; and Plan uses the fewest copies of any black-box mechanism with data-independent run selection (Sections IV and V).

  • Prototype and evaluation. We implement GERMLINE for unmodified Python MCP servers on stock Linux and answer five research questions. No canary disclosure was detected in 153 attack runs (baselines and an ablation: 5.9–74.5%), in 91 variants we generated, or with an LLM-driven agent that completes 7 of 7 tasks; single-copy calls take 10–49 ms, 2–28× faster than a fresh process per call (Sections VI and VII).

The proofs, the complete result tables, the dampening analysis, the ethics statement and the artifact description are in Appendices A to D.

References (51)