ToolFence nearly eliminates tool-using LLM agent attacks with minimal utility loss
ToolFence reduces attack success rate to near zero while only modestly decreasing clean utility
AI/ML arXiv 29 Sep 2026 Defense Prototype evidence
Published as “ToolFence: Fine-Grained Authorization for Secure Tool-Using LLM Agents”
Why it matters
ToolFence offers a practical, low-overhead defense for real-world tool-using LLM agents, making them safer against indirect prompt-injection attacks while preserving most of their functionality.
Summary
ToolFence dramatically cuts attack success: overall ASR drops from 21.20% to 0.20% on Qwen3-max with only a 3.80-point clean-utility loss and 1.63× runtime overhead, outperforming CaMeL’s 12.95× slowdown. It does this by compiling a typed authorization blueprint, enforcing it with a deterministic monitor, and granting new capabilities at the runtime level only when needed. The paper shows low within-tool ASR (0.80% on Qwen3-max, 2.10% on GPT-4o) but notes residual failures, indicating the defense is not perfect.
What they found 1
- Overall attack success rate is reduced to 0.20% on Qwen3-max with modest overhead.
“ToolFence reduces overall ASR from 21.20% (No Defense) to 0.20% with only a 3.80 percentage-point clean-utility drop and 1.63 × runtime overhead”
Caveats 3
- Within-tool attack success is not zero: 0.80% on Qwen3-max and 2.10% on GPT-4o, showing provenance constraints do not eliminate every manipulation.
- ToolFence can still fail when an attack remains inside an authorized capability shape.
- Utility loss can arise when a legitimate authority-sensitive value is available only through untrusted content. ... This creates a security-utility trade-off: permissive handling improves task completion but enlarges the attack surface.
What’s new here 4
- Introduces fine-grained provenance-aware capability authorization that distinguishes user-authorized values from untrusted observations.
- Uses a deterministic monitor for fast-path enforcement, avoiding per-call LLM judging.
- Adds a runtime capability grant mechanism with a cross-session cache to expand policies safely and efficiently.
- Specifically targets the within-tool hijacking threat, which prior tool-filter or content-filter defenses do not address.