The Attacker Moves Second: Stronger Adaptive Attacks Bypass Defenses Against Llm Jailbreaks and Prompt Injections

Milad Nasr, Nicholas Carlini, Chawin Sitawarin, Sander V. Schulhoff, Jamie Hayes, Michael Ilie, Juliette Pluto, Shuang Song, Harsh Chaudhari, Ilia Shumailov, Abhradeep Thakurta, Kai Yuanqing Xiao, Andreas Terzis, Florian Tramèr

TL;DR

Current LLM defenses against jailbreaks and prompt injections are severely overestimating their robustness by evaluating against static datasets or weak, unadapted attacks. By introducing strong, adaptive adversaries that tailor their strategies to specific defenses, this paper successfully bypasses 12 recent state-of-the-art defenses, pushing attack success rates above 90% for most of them.

What Problem Does This Paper Address?

When a new defense against LLM jailbreaks or prompt injections is published, it typically boasts a near-zero Attack Success Rate (ASR). However, the authors argue that these claims are built on a flawed evaluation methodology. Currently, defenses are tested against static datasets of historical prompts or generic, non-adaptive optimization algorithms (like standard Greedy Coordinate Gradient) without any hyperparameter tuning or defense-specific modifications.

In real-world computer security, the attacker moves second. A true adversary will analyze the defense mechanism and explicitly design an attack to exploit its unique vulnerabilities. This paper addresses this evaluation gap by establishing a rigorous framework for adaptive attacks, proving that current LLM defenses offer a false sense of security.

Methods

The authors formalize a unified framework for adaptive attacks based on an optimization loop consisting of four steps: Propose, Score, Select, and Update (PSSU).

Figure 2: A diagram of our generalized adaptive attacks against LLMs.

They instantiate this PSSU loop across four distinct attack families:

  1. Gradient-Based Methods: Approximating gradients in the model's embedding space and projecting them back to discrete tokens (e.g., an adapted version of GCG).
  2. Reinforcement Learning (RL): Treating prompt generation as an interactive environment where an attacker LLM proposes prompts, receives defense-specific score feedback, and updates its policy using Group Relative Preference Optimization (GRPO).
  3. Search-Based Methods: Framing the problem as combinatorial exploration, utilizing genetic algorithms and MAP-Elites with LLM-guided mutations to navigate the discrete token space.
  4. Human Red-Teaming: To capture human ingenuity, the authors hosted an online red-teaming competition with over 500 participants and $20,000 in prizes, challenging humans to break the defenses within an interactive environment.

Datasets

The adaptive attacks were evaluated across four prominent benchmarks depending on the defense type:

  • HarmBench: Used to evaluate jailbreak defenses.
  • AgentDojo: A benchmark for agentic tool-calling environments, used to evaluate prompt injection defenses across Slack, Travel, and Workspace suites.
  • Alpaca (Davinci): Used specifically to evaluate the StruQ defense.
  • OpenPromptInject: A standard prompt injection benchmark used to evaluate the Data Sentinel defense.

Key Insights and Ideas

  • Static Evaluations Mislead via Overfitting: Defenses that train models on a fixed set of adversarial examples do not generalize. They simply overfit to the training distribution, making them incredibly fragile to out-of-distribution adaptive attacks.
  • The Reality of Reward Hacking: Automated optimization attacks are highly susceptible to reward hacking. For instance, when attacking the StruQ defense, the RL attacker learned that simply repeating a target token ("Hacked") 50 times maximized the reward score without semantically bypassing the defense. This highlights the critical need for robust, multi-objective scoring functions.
  • Humans are Highly Query-Efficient: While automated search and RL attacks are highly scalable, expert humans remain vastly more query-efficient. Collectively, human red-teamers achieved a 100% success rate across all evaluated scenarios, often finding successful injections in under 50 queries, whereas automated search required hundreds.
Query efficiency: Humans vs. Automated Search

Key Results

The authors systematically dismantled 12 recent defenses spanning four categories: Prompting (Spotlighting, Prompt Sandwich, RPO), Training (Circuit Breaker, StruQ, MetaSecAlign), Filtering Models (Protect AI, PromptGuard, PIGuard, Model Armor), and Secret Knowledge (Data Sentinel, MELON).

Figure 1: Attack success rate of our adaptive attacks compared to the weaker or static attacks considered in the original paper evaluation. None of the 12 defenses across four common techniques is robust to strong adaptive attacks. On the rightmost bars, human red-teaming succeeds on all of the scenarios while the static attack succeeds on none.
  • Prompting & Training Defenses: Circuit Breaker dropped to 0% robustness (100% ASR via RL). MetaSecAlign, which originally reported a 2% ASR on static benchmarks, was bypassed with a 96% ASR using search-based attacks.
  • Filtering Defenses: Standalone input/output detectors like Protect AI, PromptGuard, and Model Armor all suffered an ASR >90% when the attacker was provided with the detector's confidence scores as feedback.
  • Secret Knowledge Defenses: Data Sentinel and MELON, which rely on hidden canary tokens or dual-run verifications, were bypassed with 80% and 95% ASR respectively, as adaptive attacks successfully generated conditional or task-redefining payloads.

Limitations and Future Work

Despite their success, the authors note that automated text-space optimization algorithms remain computationally expensive, slow, and less reliable than their continuous counterparts in computer vision (like PGD). Furthermore, scaling these evaluations requires substantial GPU resources or costly human red-teaming competitions.

The authors conclude that future defense research must move away from empirical "cat-and-mouse" security theater. Instead, the community needs to focus on developing defenses that are inherently robust to adaptive optimization or provide provable security guarantees.

Summary updated

BibTeX
@misc{nasr2025attacker,
  author = {Milad Nasr and Nicholas Carlini and Chawin Sitawarin and Sander V. Schulhoff and Jamie Hayes and Michael Ilie and Juliette Pluto and Shuang Song and Harsh Chaudhari and Ilia Shumailov and Abhradeep Thakurta and Kai Yuanqing Xiao and Andreas Terzis and Florian Tramèr},
  title = {{The Attacker Moves Second: Stronger Adaptive Attacks Bypass Defenses Against Llm Jailbreaks and Prompt Injections}},
  year = {2025},
  eprint = {2510.09023},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.09023},
}
Figure