mlsanityData to 14 Oct 2026

How Not to Detect Prompt Injections with an LLM

arXiv 2507.05630 ↗First posted 8 Jul 2025cs.CR cs.AI cs.LGcited by 12

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

  1. 2025DataSentinel: A Game-Theoretic Detection of Prompt Injection Attacks15 Apr
  2. 2025Defeating Prompt Injections by Design24 Mar
  3. 2024The Instruction Hierarchy: Training LLMs to Prioritize Privileged Instructions19 Apr
  4. 2024Defending Against Indirect Prompt Injection Attacks With Spotlighting20 Mar
  5. 2024Automatic and Universal Prompt Injection Attacks against Large Language Models7 Mar
  6. 2024Neural Exec: Learning (and Learning from) Execution Triggers for Prompt Injection Attacks6 Mar
  7. 2024StruQ: Defending Against Prompt Injection with Structured Queries9 Feb
  8. 2023Jatmo: Prompt Injection Defense by Task-Specific Finetuning29 Dec
  9. 2023Benchmarking and Defending Against Indirect Prompt Injection Attacks on Large Language Models21 Dec
  10. 2023Formalizing and Benchmarking Prompt Injection Attacks and Defenses19 Oct
  11. 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection23 Feb

Other references · 8

  1. 2022Training language models to follow instructions with human feedbackcited by 15,971
  2. 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
  3. 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
  4. 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 832
  5. 2023Automatic Prompt Optimization with "Gradient Descent" and Beam Searchcited by 653
  6. 2023Baseline Defenses for Adversarial Attacks Against Aligned Language Modelscited by 651
  7. 2024PLeak: Prompt Leaking Attacks against Large Language Model Applicationscited by 127
  8. 2025Securing AI Agents with Information-Flow Controlcited by 121

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 2; 2026: 10.

12 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025Beyond the Benchmark: Innovative Defenses Against Prompt Injection Attacks
  2. 2025LLMail-Inject: A Dataset from a Realistic Adaptive Prompt Injection Challenge
  3. 2024Defense Against Prompt Injection Attack by Leveraging Attack Techniques
  4. 2024Systematically Analyzing Prompt Injection Vulnerabilities in Diverse LLM Architectures
  5. 2026Defense Against Indirect Prompt Injection via Tool Result Parsing
  6. 2025Defending Against Prompt Injection With a Few DefensiveTokens
  7. 2026BASIS: Breach-Aware Selective Prompt Injection Shielding with Prefill Attention Probes
  8. 2026Analysis of LLMs Against Prompt Injection and Jailbreak Attacks