acceptodds
Under review as a conference paper at ICLR 2027

From Shield to Target: Denial-of-Service Attacks on LLM-Based Agent Guardrails

Abstract

LLM-based guardrails have emerged as an effective defense against prompt injection and jailbreak attacks in autonomous agents. However, we reveal that the very reasoning and task-following capabilities enabling this protection introduce a novel vulnerability: attackers can inject crafted data to trap the guardrail in extended reasoning loops, effectuating a systematic denial-of-service (DoS) attack. To systematically expose this threat, we design a beam-search optimization framework that crafts natural-language payloads to maximize guardrail reasoning length, utilizing an LLM proposer guided by a strategy bank. Based on the observation of guardrail's schema-following nature, we also provide another attack framework driven by mechanism-aware structural mutations with less computational load. The attack efficacy is evaluated in two parts. First, standalone evaluations cover 10 target guardrail models across safety templates and agent benchmarks. Payloads optimized on an open-source surrogate successfully transfer to leading model backbones including Claude, GPT and Gemini, achieving a 13–63 length amplification. Second, evaluations in web, code, computer-use and multi-agent deployments show up to 148 guardrail-latency amplification. In a shared-guardrail supervisor experiment with sequential access, attacked workers may reduce throughput by 23.3% and delayed benign workers by 113–146 seconds. These findings motivate explicit reasoning-cost bounds and reliable verdict recovery.

Primary area:
alignment, fairness, safety, privacy, and societal considerations
Keywords:
LLM agents, guardrails, denial-of-service attack

Reviews

Among:
Shape:
1234this paper, Top 49%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.33 over 3 reviews, above 51% of the others.
Reviewer_fKTqOpenReview ↗
Rating
2
Confidence
4
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

This paper studies denial-of-service attacks against LLM-based agent guardrails. Attackers embed text that mimics safety-review procedures into webpages, repository files, or tool outputs, to enumerate risks. Two optimization approaches are proposed: beam search using an LLM proposer, and structural mutations guided by internal model signals.

Critical strengths
  1. This is an important and well-motivated problem. The paper extends guardrail evaluation beyond verdict correctness to timely completion, which matters for practical deployments.
  2. Exploiting the structure of safety analysis is well suited to guardrails and more compelling than injecting unrelated computationally expensive tasks.
  3. Experiments span multiple models, benchmarks, guardrail templates, and agent workflows, providing evidence of transferability and downstream impact.
Critical weaknesses
  1. The attack path in a key deployment is insufficiently documented. The Claude Code experiment needs to explain precisely how repository guidance reaches the safety classifier and provide sanitized request traces to establish consistency with the threat model.
  2. Limited algorithmic novelty and incomplete comparisons. Beam search, strategy banks, and structural mutations are relatively conventional. Comparisons against simple handcrafted templates, random search, and appropriately adapted prior attacks under equal budgets are missing.
  3. Results emphasize means and maximum amplification without confidence intervals, loop-trigger rates, or truncation frequencies, making attack reliability difficult to assess.
  4. Some typos should be revised, such as "a LLM" -> an LLM, "Table 11 report"-> Table 11 reports, etc.
Questions for authors

Can you demonstrate an action that is correctly blocked without the attack but executes after an attack-induced timeout? This would distinguish an actual safety bypass from the execution of an otherwise authorized action without review.

1 comment
AuthorsOpenReview ↗

Response to fKTq on deployment evidence, comparisons, and reliability

Thank you for the constructive feedback. We address each point below.

1. How repository guidance reaches the Claude Code classifier.

The attacker poisons repository-root CLAUDE.md in a cloned repo; a user runs the stock Claude Code CLI to write .claude/settings.local.json. While Auto Mode strips Read outputs from <transcript> and auto-allows routine edits, the payload reaches the classifier natively:

  • Startup ingestion: The CLI embeds checked-in CLAUDE.md verbatim in <user_claude_md> inside messages[0] of every classifier call.
  • Stage 1 → 2 cascade: Writing .claude/settings.local.json triggers .claude/settings*.json (Self-Modification), invoking Stage 1 (max_tokens=64, stop </block>). After <block>yes</block>, Stage 2 (max_tokens=4096) receives <user_claude_md> + <transcript> and follows the injected schema in <thinking>, raising Stage 2 tokens by 4.9–7.3× and latency by 6.8–9.9× over benign Stage 2 checks (10.1–14.6× end-to-end; Table 6). Responses are captured via a read-only proxy; path and sanitized traces are in Secs. 3.2, 5.1, and App. A.5.1.

2. Algorithmic novelty and baseline comparisons.

Beam search, strategy banks, and slot mutations are standard primitives. Our novelty lies in uncovering a new security surface—turning task-confined guardrails into an availability bottleneck via schema mimicry—and characterizing its mechanism (9.6× header-attention cycling and low-entropy overfitting; Sec. 3.3.1), informing our zero-LLM search (Inst. II, Eqs. 4–5) and defense (Sec. 6).

All three baselines are in the paper (Sec. 4.2, App. B.4):

  • Handcrafted templates: Unoptimized seed schemas (Iter 0; Tables 3, 14, 18) and minimal schemas (Table 16) yield ≤2.6× extension without loops.
  • Equal-budget random/greedy search: Under equal wall-clock budget (Table 14), random guidance (−26%) or greedy k=1 search (−88%) sharply drops fitness.
  • Adapted prior DoS attacks: Six prior methods optimized in their own frameworks and injected into the same observation slot and fixed context cause minimal guardrail slowdown (≤1.20× length, ≤3.7× GPU time; Table 2), as guardrails ignore unrelated decoy tasks.

3. Reliability, loop-trigger rates, and truncation frequencies.

Table 1 optimizes on 2 cases and tests zero-shot on 20 held-out cases × 5 runs (100 runs/cell) (Sec. 4.1, App. B.1). Because responses are bimodal (Sec. 4.2)—short non-loop expansion vs. cap-approaching loops—a single Gaussian mean±CI straddles both regimes; we report ranges plus trigger and cap-hit rates:

  • Loop & amplification rates: By our regex-verified test (>3 repeats/500 chars; App. B.1), 20/60 Table 1 cells loop (*), and 40/60 still reach 13.2–43.8×. Per run/task: 8/10 TS-Guard-8B traces loop (Sec. 6); 7/10 Claude-Haiku-4.5 and 9/10 GPT-5.5 runs exceed 20× latency (App. B.3); 18/20 README and 13/20 config tasks on OpenHands exceed 3× (Table 11).
  • Truncation / cap rates: Standalone runs cap at 16,384 tokens (28,000 in LangGraph, hit by >82K-char peaks). In Claude Code (4,096-token cap; App. A.5.1), 2/12 seed and 1/5 finalist runs hit the cap vs. 0/6 benign Stage 2 runs. In WebGuard (Table 9), timeouts hit 0 baseline steps vs. 17 (allow) and 34/55 (61.8%, block).

4. Matched demonstration: blocked action executing after timeout.

Yes. We show webagent example: fixing one HIGH-risk purchase—click(33) (Place Order) on /checkout with pre-filled card details in BrowserGym + WebGuard (gpt-4o-mini, identical prompt, 0 API errors across 15 runs)—we varied only whether the page embeds frozen WEBGUARD_PAYLOAD_V1:

ConditionVerdictBlockTimeoutChars (mean, range)Latency, sExecuted
Clean page5/55/50/5645 (618–677)4.5 (3.4–6.5)0/5
Attack (no timeout)3/53/5*0/534,162 (1,071–49,927)105.1 (4.4–165.7)0/5
Attack + 30s fail-open2/52/53/57,908 (1,075–15,001)21.2 (4.6–30.2)3/5

*2/5 hit 16,384 tokens (165.7s) without risky_level (0/5 executed; even a 120s cutoff truncates before a verdict).

Clean runs block Place Order 5/5 times (4.5s), and the payload never convinces WebGuard purchasing is safe (0/5 allowed without fail-open; the 2/5 non-looping 30s runs still block in 4.6–11.0s). Yet in 3/5 runs, schema-filling streams up to 15,001 chars past 30s without risky_level, so fail-open executes click(33) to /order-confirmation (App. A.5.3).

5. Presentation.

We fixed "an LLM" and "Table 11 reports" in the revised paper.

Reviewer_oxMzOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

It identifies a novel reasoning-extension denial-of-service (DoS) vulnerability in LLM-based agent guardrails, where an attacker crafts input payloads that hijack the guardrail's schema-following analysis and trap it in extended reasoning loops. Using a beam-search optimization framework driven by LLM proposers and mechanism-aware structural mutations, the authors demonstrate a 13–63× reasoning length amplification across 10 mainstream model backbones and up to 148× latency amplification in real-world agent deployments, showing that guardrails themselves can become a critical single point of failure that severely delays workflows and starves shared multi-agent systems.

Critical strengths
  1. Uncovers a new scenario in which an LLM guardrail's own schema-following capability can be repurposed as a DoS surface.
  2. Crafting structured payloads traps the guardrail in extended reasoning loops without needing auxiliary tasks or triggering standard content filters.
  3. This paper provides open-source code with clear structure.
Critical weaknesses
  1. In practical production environments, systems can trivially defend against reasoning-extension attacks by enforcing a strict timeout (e.g., aborting or falling back after a few seconds) or setting an explicit token cap. Given these low-cost countermeasures, what irreplaceable, real-world security threats does this attack pose?
  2. The attack assumes crafted payloads reach the guardrail intact. In production pipelines, standard preprocessing (e.g., sanitization, prompt wrapping, chunking, or summarization) can easily disrupt the delicate schema structures needed to induce reasoning loops, yet the paper lacks robustness evaluations against such context perturbations.
  3. I suggest summarizing some takeaways in the main paper.
  4. The paper notes that hard cutoffs/timeouts risk fail-open or fail-closed dilemmas and proposes an entropy-based streaming detector. However, the streaming detector requires internal token logits/entropy, which are inaccessible in proprietary API deployments.
Questions for authors

Please see weaknesses.

1 comment
AuthorsOpenReview ↗

Response to oxMz on cutoff policies, preprocessing, and deployable defenses

Thank you for highlighting the practical deployment questions. We agree that the significance of this vulnerability should be assessed together with inexpensive defenses and the utility they preserve.

1. Threat under strict timeouts or explicit token caps.

A hard timeout or token cap bounds single-call compute, but only shifts the attack from compute exhaustion to a safety–availability failure (Section 6; Appendix A.5.3, Table 9). Because LLM guardrails generate <Think> reasoning before outputting a verdict, truncating generation mid-loop cuts off the response before any safety decision is reached (and tightening the cap further risks truncating legitimate reasoning on complex benign tasks). Once cut off without a verdict, neither fallback preserves guardrail utility, as shown in our BrowserGym + WebGuard evaluation (Table 9):

  • Fail-closed (Attack + block) breaks legitimate tasks: 34/55 proposed actions hit the cutoff and are rejected, dropping benign task completion from 5/10 to 3/10—directly fulfilling the attacker's task-level DoS goal.
  • Fail-open (Attack + allow) fails to block high-risk actions: 17 actions execute unreviewed; notably, on checkout (explicitly defined as a HIGH-risk financial transaction), 10/11 steps time out and default to SAFE, submitting payment without safety enforcement.

2. Robustness to sanitization, prompt wrapping, chunking, and summarization.

To directly evaluate these four pipeline perturbations, we tested a frozen Instantiation I payload (optimized on TS-Guard-8B + ToolSafe with zero re-optimization against preprocessing) across all four transformations:

Preprocessing<Think> length (chars)Amplification
None (unprocessed)42,95945.2×
Prompt wrapping (untrusted-data delimiters)19,74720.8×
Chunking (500-char windows: per window / sum of 8 windows)2,285 / 14,3442.4× / 15.1×
Sanitization (format flattening to plain prose)3,4523.6×
LLM summarization (GPT-4o-mini)1,5881.7×
  • Structure-preserving preprocessing fails to stop even frozen payloads: Untrusted-data prompt wrapping leaves the embedded schema intact and still incurs 20.8× amplification. Aggressive 500-char chunking lowers single-window output (2.4×), but because a guardrail must screen all chunks of an observation, total reasoning summed across the 8 windows still reaches 14,344 chars (15.1×).
  • Structure-destroying rewrites validate our mechanism, while transform-aware payloads bypass them: Flattening numbered checklists (3.6×) or rewriting into prose via GPT-4o-mini summarization (1.7×, despite producing a 3,566-char summary longer than the raw payload) suppresses the unadapted checklist—directly confirming Section 3.3.1 that fillable schema structure, not input length, drives the loop. In practice, however, stripping formatting or running an extra LLM summarizer on every step degrades structured agent observations (e.g., DOM trees, code, tables) and adds per-step latency; moreover, when pipelines include rewriting/summarization, our transform-aware optimization (Section 5.2, Eq. 6; evaluated across Scraper → Translator → Summarizer → Report Writer) shifts triggers into resilient entity-anchored facts and tables, retaining up to 115.8× length and 148.2× latency amplification (Table 7). We have added this perturbation analysis to Appendix B.8 (Table 19).

3. Summarizing takeaways in the main paper.

Thank you for the suggestion. We have added highlighted takeaway boxes at the end of Sections 4.2, 5.1, 5.2, and 6 in the revised main text to summarize our key findings on attack transferability, cascaded and shared-guardrail bottlenecks, and mitigation trade-offs.

4. Entropy detection in proprietary API deployments.

We agree that downstream callers of closed-source APIs typically cannot access full token logits. In Section 6, we present the streaming entropy detector as a proof-of-concept, mechanism-guided defense—validated on open-weight TS-Guard-8B (8/10 attacks detected at token 479 on average, 0/10 false positives)—to demonstrate that the low-entropy loop signature from Section 3.3.1 can effectively halt runaway reasoning when token distributions are available. Practically, this applies directly to self-hosted open-weight guardrail deployments, whereas in proprietary ecosystems its adoption depends on whether the model/platform provider exposes logprobs or integrates such monitoring server-side. We have clarified this deployment scope in Section 6.

Reviewer_hjENOpenReview ↗
Rating
3(+1)
Confidence
3(−1)
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper studies denial-of-service attacks on LLM-based agent guardrails, where attacker-controlled content induces prolonged safety reasoning and delays agent execution. The attack exploits guardrails’ tendency to follow structured analysis schemas, using payloads that mimic safety instructions to trigger excessive reasoning or repeated analysis. The authors introduce a beam-search framework with an LLM proposer and a strategy bank, alongside a mechanism-aware variant that generates payloads through structural mutations. Experiments across ten guardrail models and several agent benchmarks demonstrate increased reasoning length and transfer across model backbones, while case studies in code, web, and multi-agent workflows show substantial safety-check delays and interference with benign agents sharing a guardrail.

Critical strengths
  1. The paper introduces an interesting and realistic type of DoS attack on agents’ guardrails.
  2. The proposed approach is technically sound and reasonable.
  3. The experimental results demonstrate the effectiveness of the proposed approaches.
Critical weaknesses
  1. The current transfer experiments are not convincing enough. In the ToolSafe-based evaluation (Tables 1–2), the surrogate and target models share the same safety prompt template. In this case, the optimized payloads may be fitting that shared template. Transfer to another model using the same template is less surprising and does not fully establish transfer to a guardrail whose safety instructions are unknown. Although Table 17 explores cross-template evaluation, I’m unclear about the source model used to optimize the payloads in each row. Were all payloads optimized on TS-Guard-8B, or were they optimized separately on each model before switching templates? If it is the latter, the attack could still be exploiting behavior specific to the same model. In practice, an attacker may know neither the underlying model nor the safety instructions. I would therefore find transfer where both the model and the template change more convincing.
  2. In Section 5.1, the paper reports a 10.1–14.6× increase in safety-check latency on Claude Code Auto Mode compared with benign guidance. However, it is unclear whether the benign baseline also enters Stage 2. If it does not, the reported increase may partly reflect the normal cost of switching to a more expensive review stage, rather than additional reasoning induced by the optimized payloads within that stage. A benign baseline that also triggers Stage 2 would help distinguish these effects and clarify how much latency the attack adds beyond a normal Stage 2 review.
  3. The paper does not provide a detailed analysis of the overhead of attack optimization. In particular, it is unclear how attack success scales with the token budget spent on optimization. Exploring this scaling law can strengthen the paper’s claim.

If the author could clarify these concerns, I am willing to raise my rating.

Questions for authors

Please refer to weaknesses.

2 comments
AuthorsOpenReview ↗

Response to hjEN on transfer, Stage 2 controls, and optimization cost

Thank you for recognizing the relevance of the attack surface and for identifying these important experimental controls. We address the three concerns below.

1. Transfer when both the model and safety template change.

We clarify that all payloads across every row of Table 17 were optimized exclusively on TS-Guard-8B with the ToolSafe template and then frozen. Neither the target backbones (Claude-3.5-Haiku, DeepSeek-V3.2) nor the alternative templates (TaskShield, MELON) were used during optimization or payload selection.

Thus, while the TS-Guard-8B row isolates cross-template transfer (35,158 and 43,151 chars) and the ToolSafe column isolates cross-model transfer (61,981 and 80,803 chars), the four off-diagonal cells in Table 17 directly evaluate joint transfer where both the model and the safety instructions are unknown to the attacker:

Optimization sourceEvaluation target (new model + new template)Attacked <Think> length
TS-Guard-8B + ToolSafeClaude-3.5-Haiku + TaskShield53,074 chars (>20×)
TS-Guard-8B + ToolSafeClaude-3.5-Haiku + MELON64,842 chars (>20×)
TS-Guard-8B + ToolSafeDeepSeek-V3.2 + TaskShield70,032 chars (>20×)
TS-Guard-8B + ToolSafeDeepSeek-V3.2 + MELON82,466 chars (>20×)

This confirms that the payloads exploit general schema-following behavior in safety reasoning rather than overfitting to a shared prompt template or model backbone. We have clarified this source-to-target protocol in Section 4.2 and Appendix B.6 (Table 17).

2. A benign baseline that also enters Stage 2.

Thank you for pointing this out. We agree that the reported 10.1–14.6× slowdown in Section 5.1 reflects end-to-end cascading safety-check latency against a benign baseline that remained in Stage 1 (~2.4s), combining escalation cost with within-Stage-2 extension.

To isolate the within-Stage-2 effect, we ran an additional control over 20 benign file-write tasks invoking the Auto Mode classifier: Stage 1 averaged 2.2s, and 6/20 (30%) escalated to Stage 2, where Stage 2 averaged 329.7 tokens and 3.5s latency (5.7s for Stage 1 + Stage 2 combined; 0/6 cap hits). Comparing our finalists directly against benign runs that also enter Stage 2:

ConditionStage 2 entry rateMean Stage 2 tokensStage 2 latency (vs. benign Stage 2)
Benign file-write control6/20 (30%)329.73.5s (1.0×)
Attack Finalist 15/5 (100%)2,396 (7.3×)34.6s (9.9×)
Attack Finalist 25/5 (100%)1,606 (4.9×)23.9s (6.8×)

Even conditional on entering Stage 2, our payloads amplify Stage 2 tokens by 4.9–7.3× and Stage 2 latency by 6.8–9.9× (4.2–6.1× vs. the full 5.7s Stage 1 + Stage 2 benign cascade), while raising Stage 2 activation from 30% to 100% (3.3×). We have added this matched comparison to Section 5.1 and Appendix A.5.1 (Table 6).

3. Optimization overhead and budget dependence.

In our default AgentDojo run (GPT-5.2 proposer, TS-Guard-8B surrogate, k=5,b=5k=5, b=5 over 2 contexts; 1,008 chars at seed initialization), per-iteration token usage (k = 10310^3 tokens) and best <Think> length evolve as follows:

IterProposer in (k)Proposer out¹ (k)Surrogate in (k)Surrogate out (k)Cum. tokens (k)Best <Think>
19.817.392.7110.8230.613,151
235.516.491.095.9469.425,757
364.819.594.978.8727.438,760
486.022.892.3130.61,059.140,594
590.515.889.660.31,315.340,594
690.316.390.763.21,575.842,959
794.821.6101.5133.81,927.542,959
898.119.6100.8128.42,274.442,959

Proposer output and surrogate input remain nearly constant per round, proposer input grows linearly with retained parent response lengths before plateauing around ~90k, and surrogate output fluctuates across newly mutated candidates. Over 90% of the gain is reached by Iteration 3 (727.4k tokens) and performance saturates by Iteration 6 (42,959 chars / 45.2× at 1.58M total tokens) near the surrogate's 16,384-token cap. Moreover, Instantiation II requires zero proposer tokens, and all search cost is a one-time offline budget with zero online overhead once frozen. We have added the full budget analysis to Appendix B.7 (Table 18).

Thanks to the authors for their responses. After reading them, I find that some of my concerns have been addressed, and I have adjusted my rating accordingly.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.