← Latest papers
💬 NLP

ToolFlood: Beyond Selection -- Hiding Valid Tools from LLM Agents via Semantic Covering

This paper introduces ToolFlood, a novel retrieval-layer attack that compromises tool-augmented LLM agents by injecting a small set of adversarially crafted tools that semantically cover diverse user queries to dominate top-k retrieval results and displace all benign tools, achieving up to 95% attack success with minimal injection rates.

Original authors: Hussein Jawad, Nicolas J-B Brunel

Published 2026-03-17
📖 4 min read☕ Coffee break read

Original authors: Hussein Jawad, Nicolas J-B Brunel

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 have a super-smart robot assistant (an AI Agent) that can do amazing things like book flights, analyze stocks, or write code. But this robot can't do everything on its own; it needs to borrow tools from a giant digital toolbox.

To keep things fast, the robot doesn't look at every tool in the entire universe. Instead, it has a "librarian" (a retrieval system) that listens to your request and quickly pulls out the top 5 most relevant tools to show the robot. The robot then picks one of those 5 to do the job.

The Problem: The "ToolFlood" Attack
The paper "ToolFlood" describes a new, sneaky way to hack this system. Instead of trying to trick the robot into picking a bad tool from the list of 5, the attacker tricks the librarian so that the list of 5 only contains bad tools.

Here is how it works, using a simple analogy:

The Analogy: The "Fake Restaurant" Flood

Imagine you are in a city with 10,000 real, honest restaurants (the Benign Tools). You ask a guide for the "best Italian place." The guide looks at a map and brings you the top 5 Italian restaurants. You pick one and eat.

Now, imagine a criminal group wants to force you to eat at their terrible, overpriced restaurant.

  • Old Attack (The "Bribe"): The criminal tries to make their restaurant look slightly better than the others on the list. They change the sign to say "Best Italian in Town!" hoping the guide picks them over the real places.
  • ToolFlood Attack (The "Fake Swarm"): The criminal realizes they can't just beat the others; they need to crowd them out.
    1. They hire a robot army to create 100 fake restaurants.
    2. These fake restaurants have names and descriptions that are vaguely about Italian food, but they are written in a way that makes them look like a perfect match for anyone asking for Italian food.
    3. They flood the guide's map with these 100 fake places.
    4. When you ask for "Italian food," the guide's map is now so full of these fake places that the top 5 results are all fakes. The real, honest restaurants are pushed so far down the list that they never even get seen.
    5. You are forced to pick from the 5 fake options.

How They Do It (The "Secret Sauce")

The paper explains that the attackers use a two-step process to create this "swarm" of fake tools:

  1. Phase 1: The "Dreaming" Phase (Monte Carlo Generation)
    The attackers ask an AI to imagine thousands of fake tools. They don't ask for one specific tool; they ask the AI to create tools that could answer many different questions at once. It's like asking a chef to invent a menu that sounds good for "breakfast," "lunch," and "dinner" all at the same time. This creates a huge pile of "generic but relevant" fake tools.

  2. Phase 2: The "Sniper" Phase (Greedy Selection)
    From that huge pile, the attackers use a smart algorithm to pick the best 100 fakes. They pick the ones that are mathematically closest to the most common questions people ask. They are essentially playing a game of "cover the most ground with the fewest tiles."

Why This is Scary

  • It Bypasses Safety Guards: Most security systems check the final list of 5 tools to make sure they aren't dangerous. But in this attack, the safety guard never sees the real tools because they were never invited to the party. The guard only sees the 5 fake tools and thinks, "Oh, these look fine," and lets the robot use them.
  • It's Invisible: The attacker doesn't need to hack the robot's brain or the librarian's code. They just need to add a few hundred fake entries to the public database.
  • It Works Everywhere: The paper tested this on two huge databases of tools (MetaTool and ToolBench). Even though the attackers only added about 1% of fake tools (a tiny drop in the bucket), they managed to block the real tools 95% of the time.

The Takeaway

This paper warns us that as AI agents become more common, the "search engine" part of their brain is a weak spot. If attackers can flood the search results with cleverly disguised fakes, they can control what the AI does without ever touching the AI itself.

The Solution? We need better "librarians" that can spot when a list of results is suspiciously crowded with similar-looking items (like a swarm of fake restaurants) and filter them out before showing them to the robot.

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 →