Skip to content

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

arXiv: Jailbreaks, Prompt Injection, Poisoning & Defenses· arXiv:2609.37196· Yanjie Li, Xiangyu He, Xuelong Dai, Bin Xiao·Indexed by this site · 2026-09-30· Originally publishedDefenses

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

ToolFence compiles a capability blueprint with provenance constraints before execution, and uses deterministic monitoring and capability-level authorization to intercept tool calls; on AgentDojo with Qwen3-max, it reduces the overall ASR from 21.20% to 0.20%.

Threat modelAn attacker can inject arbitrary text into retrieved documents, tool outputs, or web pages fetched during execution, with the goal of inducing the agent to execute tool effects or permission-sensitive parameters not declared in the authenticated request. It does not assume the base model can resist injection, only that there is a trusted execution controller between the model's proposals and the tool runtime.

Questions
Tool-based LLM agents place trusted instructions and untrusted observations in the same context, and indirect prompt injection can rewrite permission-sensitive parameters. Content filtering and multi-path consensus still leave a high ASR, while CaMeL's isolation introduces high latency.
Methods
Before ToolFence touches external content, a policy architect compiles authenticated requests into capability blueprints with provenance constraints; a deterministic monitor verifies tools, provenance, and budget on a fast path, and when not covered, a reviewer grants new capability shapes rather than adjudicating each specific call, with shapes cached across sessions.
Experiments and results
On AgentDojo, Qwen3-max's Overall ASR drops from 21.20% without defense to 0.20%, Clean Utility drops by 3.80 percentage points, and latency on attacked samples is 1.63×; on GPT-4o Overall ASR is 0.90%, and on Mistral it is 0.13%.
Limitations and future work
The authors note that provenance constraints do not stop semantic choices within authorized data flows and suggest selective human confirmation for newly derived sensitive targets. The evaluation uses AgentDojo's 524 cross-tool pairs and 85 within-tool pairs, six injection strategies, and official environment state verifiers for main results.
Experimental setupQwen3-max、GPT-4o (gpt-4o-2024-08-06) et al. · AgentDojo · Clean Utility、Utility under Attack (U@A) et al.
Evaluated models
Qwen3-maxGPT-4o (gpt-4o-2024-08-06)Mistral-Small-3.1-24B-Instruct-2503
Benchmarks
AgentDojo
Metrics
Clean UtilityUtility under Attack (U@A)Overall ASRCross-tool ASRWithin-tool ASRJudge/TaskRuntime overhead
AI summaryToolFence separates user authorization values from untrusted observations by compiling a typed authorization blueprint before execution and enforcing it with a deterministic monitor, to address within-tool attacks that retain the tool but tamper with parameters.

ToolFence separates user authorization values from untrusted observations by compiling a typed authorization blueprint before execution and enforcing it with a deterministic monitor, to address within-tool attacks that retain the tool but tamper with parameters.

Related events and news

2 events · 1 news mentions

News that mentions this paper

Adversa AI 汇总 10 月 AI Agent 安全资源

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Tool-based agents lack fine-grained authorization for in-tool parameter hijacking; static filtering harms utility, while per-call adjudication is too slow.

    Tool-based LLM agents place authenticated instructions and untrusted observations in the same context, so indirect prompt injection can rewrite permission-sensitive parameters without changing tools; existing content detection and static tool filtering cannot stop this within-tool hijacking, and strong isolation is too slow.

    • Scenario: The authors state that LLM agents can already send messages, access private records, and transfer money, with system policies, user requests, retrieved documents, emails, web pages, and intermediate tool outputs all in the same context. Attackers embed instructions in external content to make the agent act on their behalf. The authors argue that defending only the first-round prompt is insufficient; authorization must cover the full execution trajectory.
    • Three classes of failure in existing methods: The authors summarize three points. (1) Within-tool hijacking keeps the intended tool and only changes recipients, amounts, URLs, or destinations; RepeatPrompt, ToolFilter, input filtering, structure-aware methods, and consensus defenses like SecInfer mainly look at content or aggregated outputs and do not authorize effects. (2) CaMeL's control-flow and data-flow isolation provides stronger guarantees but requires a custom execution pipeline, and latency limits deployment. (3) Static tool filtering cannot foresee all legitimate capabilities, so unplanned benign calls are rejected.
    • Core observation: The authors argue that the security-relevant unit is neither a single call (too fine-grained, repeated adjudication) nor the entire session (too coarse, cannot adapt), but the capability: the tool, the effect class, and provenance constraints on permission-sensitive parameters. Shapes are reusable, while specific values still require deterministic re-verification each time.
    • This paper proposes: ToolFence, an inference-time defense. Before execution, a policy architect compiles typed authorization blueprints; a deterministic monitor executes authorized calls on a fast path; when the blueprint is incomplete, a reviewer grants new capabilities rather than adjudicating each specific call; approved value-free signatures are cached across sessions.
    • Threat model:
      • Victim system: An LLM agent with base model fθ, inputs including authenticated user query q, tool set T, and intermediate tool outputs o1,…,om in multi-step trajectories.
      • Attacker knowledge and capabilities: Can inject arbitrary text into any untrusted channel, including retrieved documents, tool outputs, and web pages fetched during execution. The paper does not use the labels white-box, black-box, or no-box.
      • Attack goal: Induce the agent to perform unauthorized actions, i.e., effects or permission-sensitive parameters serving goals not declared in the authenticated request.
      • Defense assumptions: Does not assume the base model can resist injection; only assumes a trusted execution controller between the model's proposed actions and the tool runtime.
  2. What related research exists?

    Related work is divided into prompt injection attacks, and three types of defenses: input filtering, fine-tuning, and architectural.

    The paper organizes related work into attack techniques and three classes of defenses, and names PromptArmor, SecInfer, and CaMeL in method comparisons.

    Prompt Injection Attacks

    • Early coverage and optimization attacks: Liu et al. (2023), Yuan et al. (2024), Zeng et al. (2024), Shi et al. (2025a) explicitly override previous instructions; Pasquini et al. (2024), Liu et al. (2025a), Shi et al. (2024) use heuristic or gradient-based methods to iteratively update injected prompts.
    • Indirect prompt injection and structured components: Greshake et al. (2023)'s IPI injects malicious content into external data sources. Yu et al. (2023), Kim et al. (2025), Hui et al. (2024), Nasr et al. (2025) turn to structured components of agent systems. ToolHijacker (Shi et al., 2025b) uses optimized malicious descriptions to manipulate tool selection; ChatInject exploits chat template hierarchies and role confusion to increase attack success.
    • Memory and planning: ASB (Zhang et al., 2025) shows attacks can affect system prompts, memory, and planning through memory poisoning and Plan-of-Thought backdoors. The authors state that prompt injection is moving from isolated prompts to structure-aware, context-aware attacks that exploit tools, memory, and reasoning interactions.

    Input Filtering and Fine-Tuning Defenses

    • Input filtering: DataSentinel (Liu et al., 2025b), PiGuard (Li et al., 2025), PromptArmor (Shi et al., 2025c), and Wang et al. (2025), Geng et al. (2025), Zou et al. (2025). The authors state they are effective against explicit injection patterns but may remain vulnerable to semantically coherent attacks that maintain task relevance and embed malicious intent (Shi et al., 2025b; Jia et al., 2025), and may cause false positives and reduce benign utility when legitimate content contains common injection phrases.
    • Fine-tuning: StruQ (Chen et al., 2025a) splits user queries into control and data channels and fine-tunes; SecAlign (Chen et al., 2025b) adds safety-oriented preference optimization; Jatmo (Piet et al., 2024) does task-specific fine-tuning. The authors state these methods require model parameters and additional training, making them difficult for closed-source or black-box models.

    Architecture-Level Defenses

    • Prompt re-anchoring and attention: Spotlighting and Repeat User Prompt (Debenedetti et al., 2024) use separating external content or repeatedly anchoring the original user instruction to improve robustness; ICON (Wang et al., 2026) diverts model attention away from potentially unsafe instructions.
    • Consensus and data-flow isolation: SecInfer (Liu et al., 2025c) aggregates decisions over diverse reasoning paths; CaMeL (Debenedetti et al., 2025) uses explicit separation of control flow and data flow for isolation. The authors state that existing architecture-level defenses mainly detect unauthorized tools and provide much less protection for within-tool attacks that keep authorized tools but only change parameters or targets.
    • Appendix comparison: The authors state that PromptArmor scores content rather than authorization effects, leaving high residual ASR on within-tool and paraphrasing attacks; SecInfer's paths consume the same injected observation, so parameter-changing attacks recur across paths; CaMeL is conceptually closest but has high time cost for per-call data-flow analysis.

    Baseline Methods and Benchmarks

    • Baselines: No Defense, Repeat Prompt, Spotlighting, Tool Filter, PromptArmor, SecInfer (K=5, temperature 0.7), CaMeL. Ablations also include Per-call Runtime Judge.
    • Benchmark: AgentDojo (Debenedetti et al., 2024), covering Workspace, Slack, Travel, Banking.

    The authors position this work as fine-grained authorization without fine-tuning, before tool execution: using provenance constraints for within-tool attacks, and reducing review call frequency with a deterministic fast path and reusable capability-level grants.

  3. How does the paper address this problem?

    Compile a capability blueprint before execution, deterministic verification on the fast path, grant capability shapes when missing, and cache across sessions.

    ToolFence treats prompt injection as privilege escalation: before the agent touches any external content, it compiles authenticated queries into capability blueprints with provenance constraints, then executes with deterministic monitoring, granting reusable capability shapes when capabilities are missing.

    Problem Setting and Design Goals

    Three design goals are written in §3.1.

    • Determinism first: Common calls already authorized by the blueprint must not call the LLM again; latency does not grow with the number of tool calls, and the safety boundary does not depend on fallible reviews.
    • No hidden starvation: Tools remain visible to the agent at all times; unauthorized calls are explicit, recoverable rejections with diagnostic information, avoiding planning omissions that silently remove needed capabilities.
    • Capability-level authorization: When the static blueprint is incomplete, the fallback should authorize the shape of "tool–effect–provenance constraint" rather than a single concrete action, making judgments reusable, with the impact scope bounded by declared data-flow edges.

    Fine-Grained Authorization Blueprint

    The policy architect is an isolated LLM call that only sees q and the tool schemas held by the controller, not untrusted content, and outputs a typed plan P=(M,C).

    • Inventory and capabilities: M gives each tool an effect label e, with values including READ, LOCAL_COMPUTE, COMMUNICATION, FINANCIAL, EXTERNAL_WRITE, DELETE, etc., as well as per-parameter permission-sensitivity flags. C is the set of capabilities. Each capability is c=(tool, e, {pj ↦ βj}, κ, r), i.e., tool, effect, parameter bindings, call budget κ, and reusable flag r.
    • Four bindings: LITERAL means the value is copied from q; DERIVED means the value comes from the output of a named source tool s, i.e., v∈Obs(s); TEMPLATE means the value matches an authenticated template supported by q and source tools; FREE means the parameter is not permission-sensitive and can be chosen by the agent. The blueprint records provenance constraints, not concrete values.
    • Example: For send_money(recipient, amount), an allowlist that only records whether the tool is allowed is still too coarse. ToolFence constrains recipient to come from read_file("bill.txt") and amount to come from the authenticated query q.

    Deterministic Monitoring

    Each proposed call a=(tool, x) first goes through three checks by the LLM-free monitor: capability matching (there exists c covering all parameters), binding compliance, and budget (submitted count below κ, or readable capability r=TRUE). If all three are satisfied, it takes the fast path and dispatches immediately.

    • Binding compliance: LITERAL must appear in q; DERIVED must appear in the output of an executed declared source tool; TEMPLATE must match the pattern and the source tool must have been executed.
    • Read-only auto-approval: Read-only calls where every parameter provenance is USER cannot introduce new access targets and are auto-approved. Parameters coming from tool outputs or the model (e.g., a URL extracted from an injected webpage) are not auto-approved and are sent for review. The author says that in the pilot, read operations were unconditionally trusted, and the AgentDojo slack injection task could be completed by fetching an attacker-controlled URL, measuring 60% ASR.

    Runtime Capability Granting

    When the blueprint is missed, it does not immediately reject, nor ask "is this specific action acceptable?". The controller first computes a provenance label π(pj)∈{USER, TOOL, MODEL} for each parameter: whether the value appears in q, in Obs(s) of some executed source tool, or neither.

    • Proposal rejection: If any permission-sensitive parameter cannot be traced to the user or a declared source tool, the proposal is rejected (ĉ=⊥), blocking before consulting the reviewer. The author says this corresponds to typical injection patterns.
    • Grant decision: A well-formed proposal only gives the reviewer the tool, effect, per-parameter provenance constraints, and permission-sensitivity flags, not concrete parameter values. Grant(ĉ)∈{GRANT, DENY}. GRANT requires that the capability serves an authenticated request and that every permission-sensitive parameter is constrained to USER or a tool source named in the request.
    • After approval and denial: On GRANT, ĉ is appended to the running plan C and the budget is registered, and the original call returns to the fast path for preparation and dispatch. On DENY, it falls back to per-call review, preserving original per-call behavior as a last resort.
    • Fail closed: Appendix A.2 states that if the capability is not in C∪G and the grant is not GRANT, it is not dispatched; if the provenance of a permission-sensitive parameter is MODEL, then ĉ=⊥; if the reviewer output is unparseable, it defaults to DENY. Appendix B gives the full prompts for runtime authorization review and capability grant review: both run on isolated paths, the former outputs a binary JSON, the latter only evaluates capability shapes without concrete values.

    Cross-Session Caching and Flow

    The cache key is sig(c)=(tool, e, {pj ↦ (βj, source_toolsj)}). The process-level cache G only stores binding types and source tool names, not concrete parameter values, evidence text, or previous tool outputs. When reused in a new session, each concrete parameter is re-validated against the declared sources executed in the current session. Appendix A.1 states that at session start, all cached capabilities are injected into the new monitoring plan; if the signature matches, no reviewer is called and no proposal is rebuilt. Appendix Algorithm 1 summarizes the full pipeline: compile blueprint, incorporate cache, monitor, read-only auto-approval, build grant, cache hit, review grant or per-call fallback.

  4. What experiments did the paper conduct?

    Three models, six injections on AgentDojo; Qwen3-max's Overall ASR drops from 21.20% to 0.20%.

    Experimental Setup

    • Benchmark and split: AgentDojo, four domains Workspace, Slack, Travel, Banking, with 629 injection task pairs. The authors use executable ground-truth tool calls from benign and malicious tasks for parameter-aware splitting: cross-tool escalation requires at least one tool not needed by benign tasks; within-tool attacks reuse benign task tools but change permission-sensitive parameters. This yields 524 cross-tool pairs, 85 within-tool pairs, and 20 ambiguous pairs. Overall ASR is computed on 609 non-ambiguous user–attack pairs and averaged over six attacks. Split details are in Appendix C.
    • Attack strategies: Direct, Ignore Previous, Important Instructions, InjecAgent, System Message, Tool Knowledge. Main table ASR is the average over six attacks.
    • Tested models: Qwen3-max, GPT-4o (gpt-4o-2024-08-06), Mistral-small-3.1-24B (noted as Mistral-Small-3.1-24B-Instruct-2503 in the appendix). Within the same comparison block, methods use the same backbone and task instances. CaMeL's privileged LLM and isolated LLM use the same backbone.
    • Baselines: No Defense, Repeat Prompt, Spotlighting, Tool Filter, PromptArmor, SecInfer (K=5 candidate paths, temperature 0.7), CaMeL. Ablations also include Per-call Runtime Judge. The authors state they preserve each baseline's core mechanism and available original hyperparameters; full prompts and implementation details are in Appendix C.2.
    • Metrics and evaluation: Clean Utility, Utility under Attack (U@A), Overall ASR, Cross-tool ASR, Within-tool ASR, all computed with official environment state verifiers. Execution errors count as utility failures, not attack successes. Also measured are end-to-end latency, model call counts, and for ToolFence, runtime review call counts and cache hit rates.
    • Repetition and matching: Fixed seeds are used, reporting means and 95% bootstrap confidence intervals. Figure 2's error bars are paired 95% bootstrap confidence intervals over five random seeds. Methods are matched on model version, attack instances, tool loop limit, maximum output length, and retry strategy. The paper does not state specific values for the tool loop limit and maximum output length in the main text.

    Main Results

    Percentages from Table 1 and Table 4 are as follows. Overall ASR is the average over 609 pairs and six attacks.

    Swipe horizontally to read the table

    ModelDefenseClean U.U@AOverall ASRCross-toolWithin-tool
    Qwen3-maxNo Defense42.7031.8521.2020.0828.11
    Qwen3-maxTool Filter30.4431.881.670.459.18
    Qwen3-maxCaMeL32.6725.820.420.201.80
    Qwen3-maxToolFence38.9032.450.200.100.80
    GPT-4oNo Defense84.2051.0038.0136.8045.50
    GPT-4oCaMeL70.5047.801.281.003.00
    GPT-4oToolFence82.7073.800.900.702.10
    Mistral-Small-3.1-24BToolFence55.8052.300.130.050.60

    From Table 1, Table 4. For Mistral, no-defense Overall ASR is 13.98%, Within-tool is 20.19%; Tool Filter's Cross-tool is 0.39%, Within-tool is 7.69%; CaMeL's Overall ASR is 0.42%, Clean U. is 34.50%. On GPT-4o, Tool Filter's Within-tool ASR is 18.20%, Overall ASR is 6.76%.

    • Author interpretation: Tool Filter can reduce cross-tool ASR, but within-tool remains higher; restricting tool availability does not control permission-sensitive parameters. CaMeL is the strongest baseline in safety on Qwen3-max (Overall ASR 0.42%), but with high utility loss and runtime overhead. ToolFence achieves 0.20% Overall ASR on Qwen3-max, Clean Utility of 38.90% (relative to no-defense 42.70%, the summary states a drop of 3.80 percentage points), and U@A of 32.45%.
    • Residual failures: The authors state that within-tool ASR of 0.80% on Qwen3-max and 2.10% on GPT-4o supports parameter-level provenance authorization, while the non-zero failures also show that provenance constraints cannot eliminate every semantic manipulation within authorized data-flow paths.
    • Strategies and domains: Figure 2 plots cross-tool and within-tool ASR for six strategies on Qwen3-max. The authors state that Tool Filter's cross-tool ASR drops markedly, but within-tool attacks are more prominent under Important Instructions and Tool Knowledge; ToolFence maintains near-zero ASR on both attack types, including what the authors call the strongest injection strategy. The figure's y-axis is ASR (%), x-axis is the six strategies, and the legend includes eight defenses; the converted text does not preserve exact bar heights. Figure 3 shows Overall ASR across four suites on Qwen3-max; the authors state Banking and Slack are harder due to more state-changing operations and multi-step data, and ToolFence has low ASR across all four suites. Exact bar values in the figure are not preserved in the text.

    Ablations

    Table 2 adds components stepwise on Qwen3-max. U@A, ASR, reviews per task, and runtime multiplier are respectively: Per-call Runtime Judge at 31.20%, 4.35%, 6.35, 3.20×; Blueprint + Deterministic Monitor at 25.60%, 0.45%, 0.00, 1.45×; plus Dynamic Runtime Capability Grant at 30.40%, 0.18%, 1.84, 2.78×; plus Cross-Session Capability Cache at 31.80%, 0.18%, 1.05, 1.96×; Full ToolFence (+ Read Auto-Allow) at 32.45%, 0.20%, 0.82, 1.90×.

    • Author interpretation: Capabilities omitted by pure pre-execution compilation are unavailable later, so blueprint plus monitor has only 25.60% U@A. Adding runtime granting raises U@A to 30.40%. Caching barely changes safety and utility, reducing reviews per task from 1.84 to 1.05, which the authors state is a 42.9% reduction; the summary and §3.5 state a 43% reduction. Read Auto-Allow further raises U@A to 32.45%.
    • Another range in the introduction: The authors state that on Qwen3-max's AgentDojo, Tool Filter reduces cross-tool ASR to 0–1.741%, while within-tool ASR remains 2.381–14.458%. The per-condition table for this range does not appear in the provided main-text tables; the corresponding points in Table 1 are Cross-tool 0.45% and Within-tool 9.18%.

    Failure Analysis and Latency

    • Sources of utility loss: §4.4 gives an example where, when a user asks to follow a URL in a file or message, reading the source can be authorized, but the discovered URL is TOOL-derived rather than user-authenticated provenance, so a subsequent get_webpage(url) is not automatically allowed. The authors state that being more permissive would increase task completion but also expand the attack surface, and suggest only presenting newly derived sensitive targets to the user for confirmation before adding them to the authorized capability set.
    • In-shape failures: A Qwen3-max Travel case under Important Instructions had all four tool calls allowed because the restaurant name legitimately came from an authorized restaurant list output, yet the injection still influenced the model's choice among multiple candidates. The authors state that ToolFence verifies where a value comes from, not whether the choice among multiple authorized values is faithful to user intent.
    • Latency: Figure 4 compares average end-to-end runtime on 50 clean tasks and 200 attacked pairs. SecInfer is 4.51×/3.77×. CaMeL is 48.0 seconds and 81.7 seconds per sample, corresponding to 10.67× and 12.95×. ToolFence is 17.1 seconds (3.79×) on GPT-4o and 10.3 seconds (1.63×) on Qwen3-max. The summary states 1.63× on Qwen3-max and says it is markedly lower than CaMeL's 12.95×. The text does not individually label which model corresponds to 4.51×/3.77× and the two CaMeL multipliers; the authors pair 10.67× and 12.95× with 48.0 and 81.7 seconds, and explicitly label 1.63× on Qwen3-max. PromptArmor has the smallest overhead, but the authors state its safety is weaker. The contributions list also states "only 1.9× the normal execution time, while CaMeL exceeds 12×," alongside Table 2's 1.90× and the summary's 1.63×.

    Other Ablations and Analyses

    • Pilot for read auto-allow: when read operations are trusted unconditionally, AgentDojo's slack injection tasks measure 60% ASR (§3.3).
    • Full system reviews per task are 0.82, relative to Per-call Runtime Judge's 6.35 (Table 2).
    • The contributions list states capability reuse and caching reduce review calls by 43%; Table 2 shows 42.9% from 1.84 to 1.05.
    • On Mistral, Repeat Prompt's Clean U. is 57.61%, higher than No Defense's 50.39%; Spotlighting's Overall ASR is 19.88%, higher than No Defense's 13.98% (Table 4).
    • On Qwen3-max, Spotlighting's U@A is 32.83%, higher than No Defense's 31.85%, but Overall ASR remains 18.56% (Table 1).
    • The paper does not report the model names used for the policy architect and the runtime reviewer.
  5. What are some points that can be further explored?

    The authors note that semantic choices within authorized paths can still slip through and suggest selective human confirmation and stronger semantic constraints.

    Limitations and Future Directions Noted by the Authors

    • Provenance does not check whether the choice is faithful: The failure analysis in §4.4 states that ToolFence still fails when an attack stays within the shape of an authorized capability; it verifies where a value comes from, not whether the model's choice among multiple authorized values faithfully reflects user intent. The conclusion lists stronger semantic constraints as a direction to further reduce residual risk.
    • Legitimate values appear only in untrusted content: §4.4 states that utility loss can arise when legitimate permission-sensitive values are only obtainable through untrusted content. The same pattern can also carry attacker-controlled destinations, so it is not automatically allowed. The authors' mitigation is selective human confirmation: only newly derived sensitive targets are shown to the user for approval before being added to the authorized capability set. The conclusion restates this direction.
    • Static blueprint too strict: §4.3 states that the central limitation of a purely pre-execution policy compilation is that capabilities omitted from the initial plan remain unavailable even if later necessary for an already authenticated target. Runtime capability granting is used to address this limitation.
    • Release plan: The ethics statement says the authors will release evaluation artifacts with safeguards commensurate with dual-use security research. This is a plan, not a completed release.

    Experimental Coverage

    • Models and benchmarks: Main results are for Qwen3-max and GPT-4o (gpt-4o-2024-08-06) (Table 1); appendix Table 4 is for Mistral-Small-3.1-24B-Instruct-2503. The benchmark is AgentDojo's four suites, with 524 cross-tool pairs and 85 within-tool pairs contributing to Overall ASR out of 629 pairs.
    • Attacks and baselines: The six strategies are Direct, Ignore Previous, Important Instructions, InjecAgent, System Message, Tool Knowledge. Comparisons include Repeat Prompt, Spotlighting, Tool Filter, PromptArmor, SecInfer, CaMeL, and Per-call Runtime Judge in ablations.
    • Evaluation and repetition: Safety and utility use official environment state verifiers; fixed seeds, means with 95% bootstrap confidence intervals; Figure 2 uses five random seeds. Latency is compared on 50 clean tasks and 200 attacked pairs (Figure 4).
    • Component ablations: Table 2 sequentially changes blueprint plus deterministic monitoring, dynamic runtime capability granting, cross-session caching, and Read Auto-Allow, reporting U@A, ASR, reviews per task, and runtime multiplier.
    • Not reported in the paper: Model names used for the policy architect and the two types of reviewers; results under adaptive attacks (related work cites Nasr et al. (2025) on adaptive attacks bypassing defenses, but the experimental section does not report such attacks); specific values for the tool loop limit and maximum output length.
  6. Summarize the main content of the paper

    ToolFence uses provenance-constrained capability blueprints to intercept within-tool hijacking, reducing ASR below 1% on AgentDojo while maintaining a low latency multiplier.

    ToolFence is a runtime authorization defense for tool-based LLM agents, designed to block indirect prompt injection, especially in-tool hijacking that does not change the tool but only modifies permission-sensitive parameters.

    • Problem: Trusted instructions and untrusted observations share the same context. The authors argue that content filtering and multi-path consensus look at content or aggregated outputs, not authorizing effects; static tool filtering rejects legitimate out-of-plan calls; CaMeL's data-flow isolation has high overhead.
    • Approach: The policy architect compiles capabilities before touching external content, based only on authenticated queries and tool schemas: tools, effect classes, LITERAL/DERIVED/TEMPLATE/FREE provenance, budgets, and reusability flags. A deterministic monitor verifies matching, binding, and budgets on the fast path. On a miss, it first rejects the model-generated permission-sensitive parameters, then asks a reviewer to grant a capability shape without specific values; if rejected, it falls back to per-call adjudication. Only shapes are cached across sessions; specific values are re-verified in the current session. Read-only calls with all parameters from the user are automatically allowed.
    • Main results: On AgentDojo's 609 unambiguous pairs, averaged over six attack types, Qwen3-max's Overall ASR drops from 21.20% without defense to 0.20% with ToolFence (cross-tool 0.10%, in-tool 0.80%), Clean Utility from 42.70% to 38.90%, and U@A is 32.45% (Table 1). On GPT-4o, Overall ASR is 0.90%, Clean Utility is 82.70%, and U@A is 73.80%. On Mistral-Small-3.1-24B, Overall ASR is 0.13% and in-tool ASR is 0.60% (Table 4).
    • Efficiency and exceptions: In Figure 4, Qwen3-max averages 10.3 seconds and 1.63× on attacked samples; GPT-4o is 17.1 seconds and 3.79×; CaMeL is 48.0 seconds and 81.7 seconds, corresponding to 10.67× and 12.95×. In Table 2, caching reduces per-task review count from 1.84 to 1.05. The authors report a Travel case where four calls were allowed because restaurant names came from an authorized list, yet injection still influenced candidate selection.
    • Authors' conclusion: The authors argue that shifting defense from per-call review to capability-level authorization can simultaneously reduce cross-tool and in-tool hijacking, preserve utility, and incur only moderate runtime overhead; selective human confirmation and stronger semantic constraints are directions for further reducing residual risk.

Related papers

Show 3 more papers
Read originalarxiv.org