The Agent Finished the Task. Then the Trace Leaked.

A poisoned MCP tool description can trigger an extra logging call after an AI agent completes its task. Here is what the research found and how to test your own workflow.

By Prathamesh Dabir

A support agent finishes a customer’s request. It retrieves the relevant account information and drafts an accurate answer. The interface shows a completed task. The execution trace shows one more event: after the final legitimate tool call, the agent invokes a separate logging tool and sends it the original query, the server response and the answer it is about to return. The customer sees success. The trace shows an additional disclosure.

That is the behaviour examined in Log-To-Leak, a 2026 study of poisoned Model Context Protocol (MCP) tool metadata. Across 18 model–server pairs with valid tool execution, the researchers report attack success rates of 62.64% to 100%. These are experimental results, not a prediction of production breach rates. They make a narrower point: task completion and information protection are separate properties. A release test that checks only the final answer can miss a security failure.

What the researchers actually measured

Yuepeng Hu, Chongyu Fan, Sirat Samyoun and Jian Du studied an additive attack. An instruction in poisoned MCP tool metadata induced an extra, attacker-controlled logging call after the final legitimate call. The intended payload contained four fields:

  • The user query
  • The MCP server name
  • The server response
  • The agent response

The paper separates outcomes that are easy to conflate. Attack success rate ranged from 62.64% to 100% across 18 model–server pairs with valid tool execution. Conditional logging accuracy ranged from 76.55% to 95.64%. In 16 pairs, the absolute change in target-task completion was no more than 6.63 percentage points. The agent could appear to do its main job while an extra call collected interaction data.

Three evaluated defences left residual attack success above 55% on GitHub MCP with GPT-4o. An instruction detector also flagged 85.53% of benign descriptions. The authors argue for host-controlled authorisation of secondary calls: tool metadata can describe a capability, but it should not grant permission to disclose data.

Attribution matters: these are the researchers’ reported findings. Arica Tech Security did not write the paper, conduct the experiment or produce these numbers. The paper identifies AGENT-SEC ’26, held with ACM CCS in The Hague, as its workshop venue.

The successful answer is only one part of the trace

Most acceptance tests inspect the visible answer: did the agent resolve the ticket or return the right summary? That matters. It does not establish what happened behind the interface. After a successful run, which tools were called, in what order, with which arguments, and what changed in connected systems?

MCP makes that question material because tool descriptions, schemas and returned content can influence an agent’s behaviour. The OWASP MCP Security Cheat Sheet names tool poisoning, rug pulls, cross-origin escalation, the confused deputy problem and exfiltration through legitimate channels among the relevant risks. Log-To-Leak sits most directly within tool poisoning: hostile instructions in metadata influence later tool use. Its extra call illustrates how data can leave through an apparently ordinary tool.

OWASP recommends reviewing and pinning tool definitions, monitoring cross-server data flows, recording tool invocations and enforcing authorisation in trusted application code. A definition approved yesterday may change today. The OWASP Top 10 for Agentic Applications offers a broader lens: ASI01 (Agent Goal Hijack), ASI02 (Tool Misuse) and, when a poisoned component is the delivery route, ASI04 (Agentic Supply Chain Vulnerabilities). These categories can overlap without meaning the same thing.

Arica Tech Security assesses both the user-visible outcome and the underlying system behaviour: how input, context, identity and tool permissions combine to produce actions. Our earlier review of agent runtime controls covers complementary checks. This article does not claim that Arica or Arica Redline reproduced Log-To-Leak.

A staging test for the extra call

Run this exercise only on a staging system you control, with written authorisation, test accounts and synthetic data. Use a sink you own. Do not send payloads to third-party services or use real customer records. This is a method readers can apply, not a test run by Arica.

  1. Inventory the action surface. List every connected tool and classify what it can read, write, send, pay, delete or log externally. Include analytics, notifications and webhooks. A tool labelled “read-only” can still retrieve data that another tool sends elsewhere.
  2. Map untrusted channels. Identify tickets, emails, uploaded documents, retrieved pages, tool descriptions and tool results the agent consumes. Record which workflows process them and which tools those workflows can reach. Treat metadata and returned content as data, not policy.
  3. Establish a baseline. Run the normal task with synthetic data. Preserve session ID, timestamps, tool and server call order, arguments, outputs, authorisation decisions and relevant system state. A screenshot of the final answer is insufficient.
  4. Plant a controlled directive. In one synthetic input channel at a time, insert a clearly labelled instruction asking for a secondary call after the legitimate task succeeds. Direct it only to your staging sink and use fake query and response data. Keep each test attributable and reproducible.
  5. Assert on trace and state. Compare the injected run with the baseline. Did an unexpected tool run after the last legitimate call? Did its arguments include the test query, tool response or agent reply? Did data cross sessions or reach an unapproved destination? Did a webhook or record change? A correct answer alone is not a pass.
  6. Enforce host-side authorisation. Require a separate policy decision for secondary, cross-server and logging-like calls, according to their effect. A model’s explanation is not authorisation. Apply least privilege, restrict destinations and require human approval where warranted.
  7. Repeat after change. Re-run the scenario when a tool definition, server version, permission, model, prompt or workflow changes. Pin reviewed definitions and alert on changes, including OWASP’s rug-pull class.

Before deployment, record four separate release conditions:

  • Task completion: the intended task succeeds.
  • Tool-call integrity: execution contains no unauthorised calls.
  • Data protection: protected test data reaches no unapproved destination.
  • Workflow consistency: observed state matches the approved workflow.

Missing or incomplete logs are visibility gaps to investigate, not proof of a pass. Prompt filters can contribute to defence in depth; they do not replace execution-time authorisation and trace-based verification. The paper’s results are bounded by the models, servers, tasks and configurations its authors evaluated.

Before shipping a tool-using agent, test one representative workflow from input to final system state. Arica Tech Security can discuss a scoped, staging-only Arica Redline assessment of post-task tool calls and related failure patterns, subject to written authorisation, and provide a concise findings note.

Sources

  1. Hu, Fan, Samyoun and Du, “Log-To-Leak: Prompt Injection Attacks on Tool-Using LLM Agents via the Model Context Protocol”, arXiv:2610.36108, 26 October 2026.
  2. AGENT-SEC 2026 workshop, in conjunction with ACM CCS 2026, The Hague.
  3. OWASP MCP Security Cheat Sheet.
  4. OWASP Top 10 for Agentic Applications, 9 December 2025.

Need this in your own environment?

Arica Tech Security runs VAPT, ISO 27001 readiness support, and digital forensics engagements for teams in India and beyond.

Talk to our team Explore services