Security--Fidelity Tradeoffs: The Hidden Cost of Prompt Injection Defense
Mitchell Hermon, Rahul Gupta, Weitong Ruan, Ekraam Sabir, Haohan Wang
Abstract
We identify a security-fidelity tradeoff in defending LLMs against indirect prompt injection: defenses resist injected instructions largely by suppressing untrusted text, which corrupts tasks that must preserve it, such as translation and document editing. Attack-success metrics cannot see this, because a model that ignores an injection and one that faithfully processes it as data score identically. We introduce SecFid, a benchmark built so that executing an injection, processing it as data, and ignoring it produce distinguishable outputs. This makes fidelity measurable and exposes a frontier: across 1,168 examples and 48 configurations, no model or defense achieves both objectives. The highest-fidelity model reaches 96.5% fidelity at 47.8% security, while the most secure defenses invert this, at 99.3% security but only 71.0%-73.9% fidelity. Even defenses with identical security differ in how they earn it: some repair hijacks into faithful processing, others simply suppress benign content. A decision-theoretic analysis shows why no fixed choice can be right everywhere: the correct behavior is not a property of the defense but of the deployment, set by its relative cost of a hijack versus a dropped span. Security alone therefore measures only half of robustness, and reporting it without fidelity hides the price at which it was bought.
Create a lesson
Metadata
- Categories
- cs.CR, cs.AI
- Comments
- Accepted at the 43rd International Conference on Machine Learning (ICML 2026). 34 pages, 4 figures
Related papers
Benchmarking Web Agent Defenses Against Adaptive Visual Prompt Injection
Shared title terminologycs.CRHaichuan Zhang, Zhiyuan Zhong, Shih-Chieh Dai et al.
Who Is Prompt-Injecting Coding Agents? An Empirical Study of Hidden AI-Directed Text on GitHub
Shared title terminologycs.CRGabi Nakibly, Zvika Babo
SoK: Systematizing LLM Prompt Security: Taxonomies, Datasets, and Unified Evaluation of Attacks and Defenses
Shared title terminologycs.CRHanbin Hong, Shuang Wu, Shuya Feng et al.
Adaptive Evaluation of Out-of-Band Defenses Against Prompt Injection in LLM Agents
Shared title terminologycs.CRPraneeth Narisetty, Shiva Nagendra Babu Kore, Uday Kumar Reddy Kattamanchi et al.
PIPETTE: Prompt Injection Purple-Teaming for Robust LLM Agents
Shared title terminologycs.CRLipeng He, Yihan Wang, Jiawen Zhang et al.
AutoPI: Taxonomy-Guided Adaptive Red Teaming for Prompt Injection in LLM Agents
Shared title terminologycs.CRStavros Damianakis, Konstantinos Psounis