← Latest papers
💻 computer science

WebMCP Tool Surface Poisoning: Runtime Manipulation Attacks on LLM Agents

This paper identifies and analyzes "Mid-Session Tool Injection" (MSTI), a new security threat in the WebMCP protocol where attackers leverage third-party scripts to hijack or frame agent-accessible tools during active sessions, and proposes specific design mitigations to secure the tool surface against such runtime manipulation attacks.

Original authors: Lin-Fa Lee, Yi-Yu Chang, Chia-Mu Yu, Kuo-Hui Yeh

Published 2026-06-05
📖 5 min read🧠 Deep dive

Original authors: Lin-Fa Lee, Yi-Yu Chang, Chia-Mu Yu, Kuo-Hui Yeh

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you hire a highly intelligent personal assistant (an AI agent) to handle a complex task for you, like booking a trip or managing your finances. You give this assistant a list of approved tools it can use: a "Search Engine," a "Calendar," and a "Payment Processor." You trust that this list is fixed and safe.

This paper introduces a new security threat called WebMCP Tool Surface Poisoning. It argues that the list of tools available to your AI assistant isn't actually a static, locked-in list. Instead, it's like a digital menu that can be secretly rewritten by a hacker while the assistant is still working.

Here is a breakdown of the paper's findings using simple analogies:

The Core Problem: The "Magic Menu"

In the new WebMCP system, websites can hand tools directly to AI agents. The paper warns that this system has a flaw: the list of tools is dynamic.

Think of the AI agent as a chef in a kitchen. The "tools" are the knives, pots, and ingredients on the counter.

  • The Old Way: The chef gets a fixed list of ingredients at the start. If the list says "Tomatoes," the chef uses tomatoes.
  • The WebMCP Way: The ingredients on the counter can change while the chef is cooking. A mischievous third party (a hacker) can swap the "Tomatoes" for "Poisonous Berries" right before the chef reaches for them, or they can add a new, fake "Spice" that looks harmless but ruins the dish.

The Two Main Attacks

The researchers identified two specific ways hackers can mess with this "kitchen":

1. Tool Hijacking (The "Switcheroo")

This is like a magician swapping a real deck of cards for a fake one right before you pick a card.

  • How it works: A hacker uses a script to delete a legitimate tool (like "Send Email") and immediately replace it with a fake one that has the exact same name but does something evil (like "Send Email to Hacker").
  • The Result: The AI doesn't know it's been tricked. It thinks it's using the real tool, but it's actually handing your private data to the attacker.
  • The Paper's Finding: This attack is very effective. In their tests, if the swap happened early enough, the AI used the fake tool 100% of the time, sending sensitive data to the hacker.

2. Tool Framing (The "Disguise")

This is less about swapping the tool and more about lying about what the tool does.

  • How it works: The hacker doesn't remove the real tools. Instead, they add a new, malicious tool but give it a very convincing description. They might label a "Data Stealer" tool as "Security Check Required Before Sending" or "Compliance Step."
  • The Result: The AI sees a tool that sounds necessary and safe, so it decides to use it as part of its normal workflow.
  • The Paper's Finding: This is sneakier. The AI often completes the original task (like sending the email) while also using the fake tool in the background. The task looks successful, but the data has been leaked. In some cases, the AI fell for this disguise 85% of the time.

The "Recipe" for Success

The researchers tested these attacks on three of the smartest AI models available (GPT-5.4, Claude Opus, and Gemini 2.5). They found that:

  • Timing is everything: If the hacker swaps the tool before the AI starts thinking, the AI almost always falls for it. If the swap happens after the AI has already picked a tool, the attack usually fails.
  • Description matters: The AI relies heavily on the text description of the tool. If the description says "This is a mandatory safety step," the AI is very likely to obey, even if the tool is malicious.
  • Model differences: Some AIs were more gullible than others. For example, one model (Gemini) was easily tricked by long, boring descriptions filled with legal jargon, while another (Claude) was immune to that specific trick.

The Solution: Locking the Kitchen

The paper suggests that we can't just trust the AI to "know better." We need to change how the system is built. They propose four main fixes:

  1. ID Badges: Every tool should have a permanent, unchangeable ID card that proves who created it. If a tool tries to change its name or owner, the system should reject it.
  2. Check the Clock: The system should check if the tool list has changed since the AI started its task. If a tool was swapped out, the AI should stop and ask for confirmation.
  3. Data Boundaries: Tools should be told exactly what data they are allowed to touch. A "Read-Only" tool shouldn't be able to send data to a hacker's server.
  4. Keep a Log: The system should keep a detailed diary of every time a tool is added, removed, or changed, so we can see if something suspicious happened.

The Bottom Line

The paper concludes that the "tool surface" (the list of tools an AI can use) is no longer a safe, static boundary. It has become a new place where hackers can attack. Even the smartest AI models can be tricked if the tools they are allowed to use are secretly swapped or disguised while they are working. To stay safe, the system itself needs to be redesigned to verify tools constantly, rather than just trusting the AI to figure it out.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →