Signed, Sealed, Leaked: Trust Beyond Signature for MCP Toolchains
Organizations: Universiti Tunku Abdul Rahman · University of Tabuk · National University of Singapore · Bitranger, CYRES, Universiti Sains Malaysia ·
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-28x 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.
Figures & tables
| Variant | Sig+Pin | Confined +IFC | C-full | C-full- percall | Germline |
|---|---|---|---|---|---|
| pool | 3/3 (2) | 3/3 (2) | 3/3 (2) | 3/3 (2) | 0/3 |
| smuggle | 0/3 ∘ | 0/3 ∘ | 3/3 (3) | 3/3 (3) | 0/3 ∘ |
| direct | 3/3 (3) | 0/3 | 0/3 | 0/3 | 0/3 |
| launder_text | 3/3 (1) | 3/3 (1) | 0/3 ∘ | 0/3 ∘ | 0/3 |
| benign | 0/3 | 0/3 | 0/3 | 0/3 | 0/3 |
| Vector | Corpus example | How data reaches a destination | What germline execution provides |
|---|---|---|---|
| V2 input content | trigger : fires on a marker in a document | Sent directly or inside authorised requests | A parser exploit acts as V1 ( Theorem 1 ); model instructions act via V4 |
| V3 upstream outputs | xtool : one server drops data, another ships it | Added to the second server’s authorised requests | Same as V2 , with content from another tool; it reaches a later call only as a labelled item |
| V4 agent decisions (tool, recipient) | launder , launder_text : earlier data hidden in a return value | The agent forwards the value to a less-cleared sink | Labels cover items, replies and stored state of a returned value ( Corollary 2 ), so CaMeL- and FIDES-style policies receive these labels |
| Aspect | Enforced by Germline | Outside / required |
|---|---|---|
| Init reads | Read-only allowlist, no network | Allowlist holds no user data |
| Descriptors | G2 : control socket, /dev/null , read-only files | Anything else: release refused |
| Messages | Three types; broker picks slot, computes labels | No size quotas |
| Clocks, RNG | Python-level shim ( A4 ) | Native code weakens evidence only |
| Slots | Per release and horizon; an update has its own | One user per deployment |
| Destinations | URL host name, compared literally; redirects not followed | DNS and TLS attacks out of scope |
| Release | Sig+Pin | Sig+IFC | Confined+IFC | Germline | Tasks |
|---|---|---|---|---|---|
| benign | 0 | 0 | 0 | 0 | 7/7 |
| pool | 2 | 2 | 2 | 0 | 7/7 |
| dormant | 28 | 28 | 0 | 0 | 7/7 |
| launder_text | 1 | 1 | 1 | 0 | 7/7 |
| direct | 8 | 8 | 0 | 0 | 7/7 |
| smuggle | 6 | 6 | 3 | 0 | 7/7 |
| Test | Reference | Germline |
|---|---|---|
| 4 triggers from 4 releases | probe replay off: 4/4 confirmed | 3 item witnesses ( pool , launder , evasive ); 1 state divergence ( capsule ) |
| Twin test: clock and nonce, 20 runs | no twin: 20/20 false witnesses | 0/20 |
| O5 : flow-compliant call counter | probe replay off: confirmed (false positive) | state divergence, weight 250 |
| O1 : pipe opened at init | release starts | refused ( G2 ) |
| O2 : shared mapping at init | release starts | refused ( G3 ) |
| O3 : child outlives its copy | 1 live process | 0 |
| Test | Reference | Germline |
| Slot labels (reference: slot-label join off) | ||
| HR item stored, recalled by a public-only call | label ; forwarding to public sink allowed | label { hr }; forwarding refused |
| Public-only control | label ; allowed | label ; allowed |
| Mismatched request to an admissible host with a record | label { hr }; host clearance missing | label { finance , hr } |
| Sequence comparison (reference: comparison off) | ||
| Extra request (empty delivered sequence) | 0 triggers | 1 trigger; verified item witness |
| Case | Co- pies | P50 | +ms vs Sig+Pin | +ms vs Conf. | saved vs fresh | speed- up |
|---|---|---|---|---|---|---|
| noop | 1 | 9.9 | 9.9 | 9.9 | 272.2 | 28.4 |
| stats | 1 | 21.8 | 14.9 | 14.9 | 268.0 | 13.3 |
| summarize | 1 | 48.5 | 47.0 | 47.0 | 58.4 | 2.2 |
| summarize_many | 3 | 97.3 | 94.5 | 94.5 | 5.5 | 1.1 |
| Blocks or provides | Sign | Scan | Hon- ey | Con- fine | IFC | Att- est | Re- set | Germ- line |
|---|---|---|---|---|---|---|---|---|
| Undeclared hosts | – † | n/a | – | – | ||||
| Unrelated file reads | – † | n/a | – | – | ||||
| Cross-call carry-over | – † | – † | – † | – | ||||
| Within-call mixing | – † | – † | – † | – | – † | |||
| Dormant logic | – † | – † | – † | – † | – | |||
| Stateful-tool labels | – | – | – | – | – † | – |
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
| ID | RQ | Reported in | Result file(s) | Platform | Code |
|---|---|---|---|---|---|
| E1 | RQ2, RQ3 | Sections VII-C and VII-D | C: e1_final.json | cloud | M |
| E2 | RQ4 | Section VII-E | C: e2_detection.json | cloud | I |
| E3 | RQ5 | Section VII-F | S: E3_final_pass1.json , _pass2 , _pass3 | server | M |
| E4 | RQ5 | Section VII-F | C: e4_covert.json | cloud | I |
| E5 | RQ5 | Section VII-F | S: E5_final.json | server | M |
| E6 | RQ3, RQ5 | Sections VII-D and VII-F | S: E6_final_3rep.json | server (GPU) | M |
| Configuration | benign | direct | pool | smuggle | launder_text |
|---|---|---|---|---|---|
| C0 | 0/3 | 3/3 (3) | 3/3 (2) | 3/3 (3) | 0/3 |
| C-AB | 0/3 | 3/3 (3) | 3/3 (2) | 3/3 (3) | 0/3 |
| C-app | 0/3 | 3/3 (3) | 3/3 (2) | 3/3 (3) | 0/3 |
| C-ebpf | 0/3 | 0/3 | 3/3 (2) | 3/3 (3) | 0/3 |
| C-full | 0/3 | 0/3 | 3/3 (2) | 3/3 (3) | 0/3 |
| C-AB+ebpf | 0/3 | 0/3 | 3/3 (2) | 3/3 (3) | 0/3 |
| Variant | Vec. | Sig+ Pin | Sig+ IFC | Conf. +IFC | Fresh +IFC | No- Split | Germline | |
|---|---|---|---|---|---|---|---|---|
| capsule | V1 | 3 | 3 | 3 | 0 | 0 | 0 | 3 |
| dep | V1 | 3 | 3 | 3 | 0 | 0 | 0 | 3 |
| direct | V1 | 12 | 12 | 0 | 0 | 0 | 0 | 15 |
| dormant | V1 | 15 | 15 | 6 | 0 | 0 | 0 | 15 |
| evasive | V1 | 15 | 15 | 9 | 3 | 3 | 0 | 15 |
| filesteal | V1 | 15 | 15 | 0 | 0 | 0 | 0 | 15 |
| Without the mechanism | Implementation | Property test | Switch off on | |
|---|---|---|---|---|
| O1 | The germline could hold pipes, sockets or other descriptors created during initialisation, or inherited standard streams. | Before every fork, check G2 : only the control socket, /dev/null and read-only regular files; standard streams bound to /dev/null . | Release whose initialisation opens a pipe. | Release starts release refused ( G2 ). |
| O2 | The germline could hold an anonymous shared writable mapping. | Before every fork, check G3 : no shared writable mapping. | Release whose initialisation maps shared memory. | Release starts release refused ( G3 ). |
| O3 | A copy’s descendants could outlive it. | Each copy runs as PID 1 of its own PID namespace, so its descendants terminate with it. | Tool that leaves a sleeping child process. | 1 live process after the call 0. |
| O4 | Recorded replies could reach larger views regardless of clearance, and Plan would not split by clearance. | Admissibility test on replies; clearance split in Plan ; output labels include the clearances of replying hosts; slots keyed by horizon ( Definition 3 ). | Consumer cleared for finance ; reply from a host cleared for projx . | 1 copy, consumer receives the reply 2 copies, consumer receives the placeholder. |
| O5 | Verification would replay each copy with its own slot and without the reply transcript. | Witnesses record the reply transcript; verify() runs the probe replay ( Definition 6 ) and the control ( Definition 6 ) and classifies the outcome. | Flow-compliant per-horizon call counter. | 1 trigger, confirmed as a flow violation (false positive) probe classifies it as a state divergence (weight 250). |
| Assumption | Enforced by | Prototype status and test |
|---|---|---|
| A1 Confinement | Fresh network and IPC namespaces per copy; each copy is PID 1 of its own PID namespace; Landlock read-only allowlist (system paths, package, /proc/self ) with no writable path; on Landlock ABI 6, signals and abstract sockets scoped; copies run one at a time, smallest view first; a copy that exceeds its absolute deadline on the broker’s clock is killed with its descendants, its consumers receive an error, and the other copies run as planned. | Enforced ( O3 and the deadline). A lingering child process: 1 live process with the PID namespace switched off, 0 with it on, on ABI 4 and ABI 7. A copy that never finishes, one that keeps sending messages and one waiting on a slow destination host are each killed at the deadline, and the next call succeeds ( Table VI ). Sequential copies reduce the parallel timing channel measured in E4 (37.9–47.7 bit/s in parallel, at most 0.61 bit/s sequentially; Section IX-B ). |
| A2 Data-free germline | The broker checks the germline through /proc before every fork ( G1 one thread, G2 descriptors, G3 shared mappings) and refuses the release if a check fails; numeric libraries pinned to one thread. | Enforced ( O1 , O2 ). Releases whose initialisation opens a pipe or maps shared memory are refused, on ABI 4 and ABI 7. |
| A3 Trusted base | Assumption: kernel, broker, label and clearance policy, signature verification. The broker does not follow redirects, so requests go only to the named destination. | Assumed; redirect test: a 302 and a body-preserving 307 reach the attacker host with redirect-following on (1 request each, 21 item bytes for 307) and 0 requests with it off ( Table VI ). |
| A4 Twin scope | The tool host freezes wall-clock time and datetime , replaces the monotonic clock and performance counters with a deterministic counter, and seeds random , os.urandom and numpy.random per call. | Enforced as stated; the CPU cycle counter ( rdtsc ) lies outside the twin scope ( Section IX-B ); prevention does not depend on A4 . Twin test: 20/20 false witnesses without twin execution, 0/20 with it. E9: secret-dependent noise drawn from os.urandom or the performance counter yields 20/20 verified witnesses; noise behind a random coin raises none, because both twins draw the same coin. |
| A5 Public metadata | All copies receive the same metadata; items outside a copy’s view arrive as a name with empty contents. | Holds; the experiments pass only paths and flags as arguments, and secret content travels as labelled items. |
| A6 Responses | The broker returns a destination host’s reply to a copy only if it is admissible, by position in that host’s recorded sequence, and a placeholder otherwise; Plan splits hosts of different clearance. | Enforced ( O4 ). A finance -cleared consumer receives a projx -cleared host’s reply with the clearance split switched off and the placeholder with it on. |
| Replay outcome | Meaning | Event | Weight |
|---|---|---|---|
| Probe differs on all tries; control never differs | Item witness: requests depend on uncleared items ( Theorem 2 ) | verified if determinism declared, else verified_undeclared | 2000 / 250 |
| Probe matches; trigger came from slot or replies | State or response divergence ( Proposition 1 ) | unverified | 250 |
| Control differs; determinism declared | Signed determinism declaration not kept ( Proposition 2 ) | declared_broken | 2000 |
| Control differs; determinism not declared | Nondeterminism beyond twin control | unverified | 250 |
| Random | Bursty | |||||
|---|---|---|---|---|---|---|
| 1% | 0 | 0 | 0 | 11.55 | 74.35 | 100 |
| 2% | 0.05 | 0.05 | – | 34.95 | 99.6 | – |
| 3% | 0.15 | 2.4 | 23.2 | 61.25 | 100 | 100 |
| 4% | 2.25 | 28.35 | – | 82.2 | 100 | – |
| 5% | 15.8 | 86.4 | 100 | 91.85 | 100 | 100 |
AI Agent Security
Artificial intelligence agent security studies attacks and safeguards for tool-using, persistent, and collaborative systems across digital and physical settings.
See all 548 papers