← Lab /Security & privacy

Mid-Session Tool Injection lets attackers hijack or reframe LLM agent tools via WebMCP

MSTI attacks can successfully disrupt WebMCP tool functionality by hijacking or framing tools

Security & privacy arXiv 4 Jun 2026 Attack Prototype evidence Threat model

Published as “WebMCP Tool Surface Poisoning: Runtime Manipulation Attacks on LLM Agents”

Why it matters

WebMCP deployments need origin-based access control and stricter validation of tool metadata to prevent stealthy tool-framing attacks that can exfiltrate data while appearing to complete tasks.

Summary

Tool hijacking attacks on WebMCP can force agents to invoke malicious tools and exfiltrate data in 100% of runs, but they often abort the original workflow, yielding task completion as low as 17%. In contrast, tool-framing attacks achieve high malicious-tool invocation (up to 100%) while preserving task completion rates up to 85%, making them stealthier. The evidence comes from experiments on three LLMs across four realistic task scenarios, but the study uses a polyfilled browser environment rather than native WebMCP implementations.

What they found 2

  1. Tool hijacking (C3) achieves perfect malicious-tool invocation and data exfiltration but very low task completion.

    “Across all three models, C3 achieves 100% malicious tool invocation and data exfiltration, but only a 17% task completion rate.”

  2. Tool framing attacks retain high task completion while still succeeding.

    “Tool Framing attacks such as C2, C4, and C5 are less disruptive and remain effective while preserving high task completion rates of up to 85%.”

Caveats 7

  • C3’s 100% attack success is offset by only 17% task completion, limiting practical impact.
  • Claude Opus shows 0% malicious-tool invocation for the long-description framing attack (C4), indicating model-specific immunity.
  • Certain attack conditions (e.g., C6) achieve 0% success across all models, showing that not all surface manipulations are effective.
  • Because this setup uses a polyfill rather than Chrome’s native WebMCP implementation, and runs the agent in a Node.js headless environment rather than under the full security model of a real browser, the feasibility of our attacks under native browser deployments may vary depending on implementation details across browsers.
  • We did not conduct a user study, leaving open the question of whether real users can detect Tool Framing attacks when the original task appears to complete normally, a question that is particularly important given the high task completion rates of C2, C4, and C5.
  • Our defense evaluation covers only two of the four design categories outlined in Table 8 and uses simulated origin enforcement at the ProxyClient layer rather than at the browser polyfill; Categories B and D are not implemented, and the practical cost of these defenses under production WebMCP deployments remains to be measured.
  • The low task completion rates observed for Tool Hijacking attacks (C1, C3) reflect a consequence of our payload design rather than an inherent property of the attack class.

What’s new here 4

  • Defines and systematically studies Mid-Session Tool Injection (MSTI) as a new class of dynamic tool-surface attacks.
  • Evaluates both tool hijacking and tool framing attacks on multiple SOTA LLM agents, showing high success rates.
  • Analyzes the impact of individual tool metadata fields (description, readOnlyHint, inputSchema) on attack effectiveness.
  • Provides a threat model focused on third-party script compromise that manipulates the agent’s tool registry.

Threat model stated by the source

Adversaryattacker who can compromise or inject a third-party script loaded by the victim website
Capabilityexecute arbitrary same-page scripts in the user’s browser to manipulate the tool registry visible to the LLM agent
Assumesagents rely on dynamically exposed tool surface; no origin-based access control on tool registration