Gandalf the Red: Adaptive Security for LLMs
Not on the map. Why?
Abstract (arXiv)
Current evaluations of defenses against prompt attacks in large language model (LLM) applications often overlook two critical factors: the dynamic nature of adversarial behavior and the usability penalties imposed on legitimate users by restrictive defenses. We propose D-SEC (Dynamic Security Utility Threat Model), which explicitly separates attackers from legitimate users, models multi-step interactions, and expresses the security-utility in an optimizable form. We further address the shortcomings in existing evaluations by introducing Gandalf, a crowd-sourced, gamified red-teaming platform designed to generate realistic, adaptive attack. Using Gandalf, we collect and release a dataset of 279k prompt attacks. Complemented by benign user data, our analysis reveals the interplay between security and utility, showing that defenses integrated in the LLM (e.g., system prompts) can degrade usability even without blocking requests. We demonstrate that restricted application domains, defense-in-depth, and adaptive defenses are effective strategies for building secure and useful LLM applications.
Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). Builds on 30 of its 68 references that are in the map. First posted on arXiv 14 Jan 2025.
Builds on
30 of 68 references.
References · 30
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 2,914
- 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injectioncited by 1,339
- 2024HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusalcited by 1,330
- 2023Enhancing Chat Language Models by Scaling High-quality Instructional Conversationscited by 825
- 2023AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Modelscited by 738
- 2022Red Teaming Language Models to Reduce Harms: Methods, Scaling Behaviors, and Lessons Learnedcited by 702
- 2024How Johnny Can Persuade LLMs to Jailbreak Them: Rethinking Persuasion to Challenge AI Safety by Humanizing LLMscited by 533
- 2024JailbreakBench: An Open Robustness Benchmark for Jailbreaking Large Language Modelscited by 494
- 2024The Instruction Hierarchy: Training LLMs to Prioritize Privileged Instructionscited by 441
- 2023Jailbreak and Guard Aligned Language Models with Only Few In-Context Demonstrationscited by 401
- 2023Multi-Agent Collaboration: Harnessing the Power of Intelligent LLM Agentscited by 329
18 more
- 2023Formalizing and Benchmarking Prompt Injection Attacks and Defensescited by 328
- 2024StruQ: Defending Against Prompt Injection with Structured Queriescited by 325
- 2023Low-Resource Languages Jailbreak GPT-4cited by 290
- 2023Exploiting Programmatic Behavior of LLMs: Dual-Use Through Standard Security Attackscited by 268
- 2023Certifying LLM Safety against Adversarial Promptingcited by 248
- 2023Benchmarking and Defending Against Indirect Prompt Injection Attacks on Large Language Modelscited by 237
- 2024Defending Against Indirect Prompt Injection Attacks With Spotlightingcited by 233
- 2024ArtPrompt: ASCII Art-based Jailbreak Attacks against Aligned LLMscited by 197
- 2024Robust Prompt Optimization for Defending Language Models Against Jailbreaking Attackscited by 150
- 2023Tensor Trust: Interpretable Prompt Injection Attacks from an Online Gamecited by 135
- 2024Automatic and Universal Prompt Injection Attacks against Large Language Modelscited by 112
- 2023Jatmo: Prompt Injection Defense by Task-Specific Finetuningcited by 89
- 2024Neural Exec: Learning (and Learning from) Execution Triggers for Prompt Injection Attackscited by 78
- 2023Attack Prompt Generation for Red Teaming and Defending Large Language Modelscited by 73
- 2024Operationalizing a Threat Model for Red-Teaming Large Language Models (LLMs)cited by 44
- 2024An Early Categorization of Prompt Injection Attacks on Large Language Modelscited by 28
- 2024Embedding-based classifiers can detect prompt injection attackscited by 24
- 2024Lightweight Safety Classification Using Pruned Language Modelscited by 5
Built on by
Citing papers per year: 2025: 5; 2026: 2.
7 papers.
- 2025The Attacker Moves Second: Stronger Adaptive Attacks Bypass Defenses Against Llm Jailbreaks and Prompt Injectionscited by 108
- 2025Activated LoRA: Fine-tuned LLMs for Intrinsicscited by 9
- 2025Weakest Link in the Chain: Security Vulnerabilities in Advanced Reasoning Modelscited by 7
- 2025Breaking Agent Backbones: Evaluating the Security of Backbone LLMs in AI Agentscited by 7
- 2025K2-V2: A 360-Open, Reasoning-Enhanced LLMcited by 3
- 2026RedBench: A Universal Dataset for Comprehensive Red Teaming of Large Language Modelscited by 3
- 2026Conditioned Activation Transport for T2I Safety Steeringcited by 3
- 2026Conditioned Activation Transport for T2I Safety Steering3 Mar 2026
- 2026RedBench: A Universal Dataset for Comprehensive Red Teaming of Large Language Models7 Jan 2026
- 2025K2-V2: A 360-Open, Reasoning-Enhanced LLM5 Dec 2025
- 2025Breaking Agent Backbones: Evaluating the Security of Backbone LLMs in AI Agents26 Oct 2025
- 2025The Attacker Moves Second: Stronger Adaptive Attacks Bypass Defenses Against Llm Jailbreaks and Prompt Injections10 Oct 2025
- 2025Weakest Link in the Chain: Security Vulnerabilities in Advanced Reasoning Models16 Jun 2025
- 2025Activated LoRA: Fine-tuned LLMs for Intrinsics16 Apr 2025