mlsanityData to 7 Oct 2026

Can Indirect Prompt Injection Attacks Be Detected and Removed?

arXiv 2502.16580 ↗First posted 23 Feb 2025cs.CRcited by 43

On the map: LLM safety and security → Prompt injection and agent security

Abstract (arXiv)

Prompt injection attacks manipulate large language models (LLMs) by misleading them to deviate from the original input instructions and execute maliciously injected instructions, because of their instruction-following capabilities and inability to distinguish between the original input instructions and maliciously injected instructions. To defend against such attacks, recent studies have developed various detection mechanisms. If we restrict ourselves specifically to works which perform detection rather than direct defense, most of them focus on direct prompt injection attacks, while there are few works for the indirect scenario, where injected instructions are indirectly from external tools, such as a search engine. Moreover, current works mainly investigate injection detection methods and pay less attention to the post-processing method that aims to mitigate the injection after detection. In this paper, we investigate the feasibility of detecting and removing indirect prompt injection attacks, and we construct a benchmark dataset for evaluation. For detection, we assess the performance of existing LLMs and open-source detection models, and we further train detection models using our crafted training datasets. For removal, we evaluate two intuitive methods: (1) the segmentation removal method, which segments the injected document and removes parts containing injected instructions, and (2) the extraction removal method, which trains an extraction model to identify and remove injected instructions.

Key facts. Cited by 43 papers in the map (data through 7 Oct 2026). Placed in Prompt injection and agent security, one of 12 directions in LLM safety and security. First posted on arXiv 23 Feb 2025.

Builds on

No reference list yet.

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 18; 2026: 25.

43 papers.

Sort:

By area:

  1. 2025Advances and Challenges in Foundation Agents: From Brain-Inspired Intelligence to Evolutionary, Collaborative, and Safe Systemscited by 125
  2. 2025Safety in Large Reasoning Models: A Surveycited by 58
  3. 2025IPIGuard: A Novel Tool Dependency Graph-Based Defense Against Indirect Prompt Injection in LLM Agentscited by 46
  4. 2026Zombie Agents: Persistent Control of Self-Evolving LLM Agents via Self-Reinforcing Injectionscited by 44
  5. 2025AgentArmor: Enforcing Program Analysis on Agent Runtime Trace to Defend Against Prompt Injectioncited by 39
  6. 2025EvoTest: Evolutionary Test-Time Learning for Self-Improving Agentic Systemscited by 34
  7. 2025MCIP: Protecting MCP Safety via Model Contextual Integrity Protocolcited by 33
  8. 2025Agentic AI Security: Threats, Defenses, Evaluation, and Open Challengescited by 26
  9. 2025Defending against Indirect Prompt Injection by Instruction Detectioncited by 25
  10. 2026The Landscape of Prompt Injection Threats in LLM Agents: From Taxonomy to Analysiscited by 25
  11. 2025PromptLocate: Localizing Prompt Injection Attackscited by 23
  12. 2025ASIDE: Architectural Separation of Instructions and Data in Language Modelscited by 21
31 more
  1. 2026A Framework for Formalizing LLM Agent Securitycited by 16
  2. 2025Enabling Self-Improving Agents to Learn at Test Time With Human-In-The-Loop Guidancecited by 14
  3. 2026VIGIL: Defending LLM Agents Against Tool Stream Injection via Verify-Before-Commitcited by 13
  4. 2025CommandSans: Securing AI Agents with Surgical Precision Prompt Sanitizationcited by 12
  5. 2026WebSentinel: Detecting and Localizing Prompt Injection Attacks for Web Agentscited by 10
  6. 2026AgentSys: Secure and Dynamic LLM Agents Through Explicit Hierarchical Memory Managementcited by 10
  7. 2025EVA: Evolving Semantic Adversaries for Red-Teaming GUI Agents Against Environmental Injection Attackscited by 8
  8. 2026Defense Against Indirect Prompt Injection via Tool Result Parsingcited by 8
  9. 2026EvoClinician: A Self-Evolving Agent for Multi-Turn Medical Diagnosis via Test-Time Evolutionary Learningcited by 8
  10. 2025Context Reasoner: Incentivizing Reasoning Capability for Contextualized Privacy and Safety Compliance via Reinforcement Learningcited by 7
  11. 2025Taxonomy, Evaluation and Exploitation of IPI-Centric LLM Agent Defense Frameworkscited by 7
  12. 2025From ASR to ASP: Evaluating Prompt Attack Vulnerabilities Against Open-Source LLMscited by 6
  13. 2026Evaluating Privilege Usage of Agents with Real-World Toolscited by 4
  14. 2025Exploiting Web Search Tools of AI Agents for Data Exfiltrationcited by 3
  15. 2026Who Tests the Testers? Systematic Enumeration and Coverage Audit of LLM Agent Tool Call Safetycited by 2
  16. 2026IntraGuard: Committee-Side Defenses Against Review Outsourcing to Commercial Chatbotscited by 2
  17. 2026WebTrap: Stealthy Mid-Task Hijacking of Browser Agents During Navigationcited by 2
  18. 2026Securing LLM Agents Need Intent-to-Execution Integritycited by 2
  19. 2025Your Mailbox Is Mine: Prompt Injection Attacks Against Real-World LLM Email Agentscited by 1
  20. 2026RedVisor: Reasoning-Aware Prompt Injection Defense via Zero-Copy KV Cache Reusecited by 1
  21. 2026Depth Charge: Jailbreak Large Language Models from Deep Safety Attention Headscited by 1
  22. 2026Are GUI Agents Focused Enough? Automated Distraction via Semantic-level UI Element Injectioncited by 1
  23. 2026Isolation as a First-Class Principle for LLM-Agent System Safety: Concepts, Taxonomy, Challenges and Future Directionscited by 1
  24. 2026PVDetector: Detecting Prompt Injection Attacks on Purpose-Specific LLM Agents through Policy-Violation Concept Analysiscited by 1
  25. 2026CLASP: Defending Hybrid Large Language Models Against Hidden State Poisoning Attackscited by 0
  26. 2026ContextLens: Modeling Imperfect Privacy and Safety Context for Legal Compliancecited by 0
  27. 2026Beyond Explicit Refusals: Soft-Failure Attacks on Retrieval-Augmented Generationcited by 0
  28. 2026BadSKP: Backdoor Attacks on Knowledge Graph-Enhanced LLMs with Soft Promptscited by 0
  29. 2026Governing Execution Risk in Agentic AI Systems: A Trajectory-Guided Framework for Red Teamingcited by 0
  30. 2026Implicit Manipulation for Skill Selection in LLM Agents with Semantic Matchingcited by 0
  31. 2026Rethinking Indirect Prompt Injection as a Test-Time Search Problemcited by 0