potentialpaper

ToolFence: Fine-Grained Authorization for Secure Tool-Using LLM Agents

Anonymous authors

ICLR 2027

Edit this page

Or clone it with git

Run in a terminal:

Needs Git LFS. To push, use an API key from your profile as the password.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

TL;DR. We introduce ToolFence, a novel prompt-injection defense that substantially improves robustness against within-tool attacks while incurring only moderate runtime overhead.

Abstract. Tool-using LLM agents remain vulnerable to indirect prompt injection because trusted instructions and untrusted observations share one context, allowing malicious content to steer consequential input-filtering defenses and multi-path consensus defenses still leave a high attack success rate because they examine content or aggregated outputs rather than authorizing effects, especially for the \textit{within-tool attack}, which preserves the intended tool but manipulates its arguments. Data-Flow Control such as CaMeL provides stronger guaranties, but needs substantial time latency that limits practical deployment. We introduce \textbf{ToolFence}, which compiles a typed authorization blueprint before execution, enforces it through a deterministic monitor, and when the blueprint is incomplete asks a judge to grant new capabilities rather than adjudicate each concrete call. ToolFence provides \textit{two key advantages}. First, its fine-grained provenance-aware authorization enables the system to distinguish user-authorized values from untrusted observations, effectively addressing the within-tool attack. Second, its deterministic fast path and capability-level runtime grants substantially reduce the frequency of expensive judge calls, improving runtime efficiency. On AgentDojo with Qwen3-max, 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 ×\times runtime overhead, substantially lower than CaMeL's 12.95$\times$.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

edit · history

DateVersionSubmitted toPDFEvidence
9 Sep 2026ICLR 2027submittedICLR 2027Desk rejectedreviews ↓[1]PDF[1]
Missing a version?

ICLR 2027

Desk rejected · OpenReview

Updated 24 Nov 2026, 16:46 UTC.

The venue hasn't published any reviews yet.

Missing a submission?

Loading the discussion…