How Not to Detect Prompt Injections with an LLM
On the map: LLM safety and security → Prompt injection and agent security
Abstract (arXiv)
LLM-integrated applications and agents are vulnerable to prompt injection attacks, where adversaries embed malicious instructions within seemingly benign input data to manipulate the LLM's intended behavior. Recent defenses based on known-answer detection (KAD) scheme have reported near-perfect performance by observing an LLM's output to classify input data as clean or contaminated. KAD attempts to repurpose the very susceptibility to prompt injection as a defensive mechanism. We formally characterize the KAD scheme and uncover a structural vulnerability that invalidates its core security premise. To exploit this fundamental vulnerability, we methodically design an adaptive attack, DataFlip. It consistently evades KAD defenses, achieving detection rates as low as 0% while reliably inducing malicious behavior with a success rate of 91%, all without requiring white-box access to the LLM or any optimization procedures.
Key facts. Cited by 12 papers in the map (data through 14 Oct 2026). Placed in Prompt injection and agent security, one of 12 directions in LLM safety and security. Builds on 19 of its 53 references that are in the map. First posted on arXiv 8 Jul 2025.
Builds on
19 of 53 references.
Closest ancestors · 11
Same direction, newest first
- 2025DataSentinel: A Game-Theoretic Detection of Prompt Injection Attacks15 Apr
- 2025Defeating Prompt Injections by Design24 Mar
- 2024The Instruction Hierarchy: Training LLMs to Prioritize Privileged Instructions19 Apr
- 2024Defending Against Indirect Prompt Injection Attacks With Spotlighting20 Mar
- 2024Automatic and Universal Prompt Injection Attacks against Large Language Models7 Mar
- 2024Neural Exec: Learning (and Learning from) Execution Triggers for Prompt Injection Attacks6 Mar
- 2024StruQ: Defending Against Prompt Injection with Structured Queries9 Feb
- 2023Jatmo: Prompt Injection Defense by Task-Specific Finetuning29 Dec
- 2023Benchmarking and Defending Against Indirect Prompt Injection Attacks on Large Language Models21 Dec
- 2023Formalizing and Benchmarking Prompt Injection Attacks and Defenses19 Oct
- 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection23 Feb
Other references · 8
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
- 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 832
- 2023Automatic Prompt Optimization with "Gradient Descent" and Beam Searchcited by 653
- 2023Baseline Defenses for Adversarial Attacks Against Aligned Language Modelscited by 651
- 2024PLeak: Prompt Leaking Attacks against Large Language Model Applicationscited by 127
- 2025Securing AI Agents with Information-Flow Controlcited by 121
Built on by
Citing papers per year: 2025: 2; 2026: 10.
12 papers.
- 2026Formal Policy Enforcement for Real-World Agentic Systemscited by 33
- 2025Systems Security Foundations for Agentic Computingcited by 13
- 2026AgentSys: Secure and Dynamic LLM Agents Through Explicit Hierarchical Memory Managementcited by 10
- 2026Agent Security is a Systems Problemcited by 5
- 2026Adversarial Attacks on Multimodal Large Language Models: A Comprehensive Surveycited by 4
- 2026Context Contamination in LLM Analysis of Network Security Logs: Poison with Passive Prompt Injection and Mitigation Evaluationcited by 3
- 2025Epistemic Bias Injection: Manipulating LLM Opinion via Selective Context Retrievalcited by 2
- 2026Prismata: Confining Cross-Site Prompt Injection in Web Agentscited by 1
- 2026A Sentence Relation-Based Approach to Sanitizing Malicious Instructionscited by 0
- 2026When Tool Outputs Become Commands: Separating Action Induction from Runtime Authorization in Tool-Augmented LLM Agentscited by 0
- 2026Beyond the Verdict: Evidence-Aligned Evaluation of Visual Prompt-Injection Guardrailscited by 0
- 2026When the Agent Becomes the Kernel: A Systematization of Security on the Path to AI-Native Operating Systemscited by 0
- 2026When the Agent Becomes the Kernel: A Systematization of Security on the Path to AI-Native Operating Systems20 Sep 2026
- 2026Beyond the Verdict: Evidence-Aligned Evaluation of Visual Prompt-Injection Guardrails2 Sep 2026
- 2026When Tool Outputs Become Commands: Separating Action Induction from Runtime Authorization in Tool-Augmented LLM Agents27 Aug 2026
- 2026Context Contamination in LLM Analysis of Network Security Logs: Poison with Passive Prompt Injection and Mitigation Evaluation16 Jul 2026
- 2026Prismata: Confining Cross-Site Prompt Injection in Web Agents9 Jul 2026
- 2026Agent Security is a Systems Problem18 May 2026
- 2026A Sentence Relation-Based Approach to Sanitizing Malicious Instructions1 May 2026
- 2026Adversarial Attacks on Multimodal Large Language Models: A Comprehensive Survey30 Mar 2026
- 2026Formal Policy Enforcement for Real-World Agentic Systems18 Feb 2026
- 2026AgentSys: Secure and Dynamic LLM Agents Through Explicit Hierarchical Memory Management7 Feb 2026
- 2025Systems Security Foundations for Agentic Computing1 Dec 2025
- 2025Epistemic Bias Injection: Manipulating LLM Opinion via Selective Context Retrieval30 Nov 2025
Similar, not cited
Close in wording, no citation either way
- 2025Beyond the Benchmark: Innovative Defenses Against Prompt Injection Attacks
- 2025LLMail-Inject: A Dataset from a Realistic Adaptive Prompt Injection Challenge
- 2024Defense Against Prompt Injection Attack by Leveraging Attack Techniques
- 2024Systematically Analyzing Prompt Injection Vulnerabilities in Diverse LLM Architectures
- 2026Defense Against Indirect Prompt Injection via Tool Result Parsing
- 2025Defending Against Prompt Injection With a Few DefensiveTokens
- 2026BASIS: Breach-Aware Selective Prompt Injection Shielding with Prefill Attention Probes
- 2026Analysis of LLMs Against Prompt Injection and Jailbreak Attacks