Can Indirect Prompt Injection Attacks Be Detected and Removed?
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
Citing papers per year: 2025: 18; 2026: 25.
43 papers.
Sort:
By area:
- 2025Advances and Challenges in Foundation Agents: From Brain-Inspired Intelligence to Evolutionary, Collaborative, and Safe Systemscited by 125
- 2025Safety in Large Reasoning Models: A Surveycited by 58
- 2025IPIGuard: A Novel Tool Dependency Graph-Based Defense Against Indirect Prompt Injection in LLM Agentscited by 46
- 2026Zombie Agents: Persistent Control of Self-Evolving LLM Agents via Self-Reinforcing Injectionscited by 44
- 2025AgentArmor: Enforcing Program Analysis on Agent Runtime Trace to Defend Against Prompt Injectioncited by 39
- 2025EvoTest: Evolutionary Test-Time Learning for Self-Improving Agentic Systemscited by 34
- 2025MCIP: Protecting MCP Safety via Model Contextual Integrity Protocolcited by 33
- 2025Agentic AI Security: Threats, Defenses, Evaluation, and Open Challengescited by 26
- 2025Defending against Indirect Prompt Injection by Instruction Detectioncited by 25
- 2026The Landscape of Prompt Injection Threats in LLM Agents: From Taxonomy to Analysiscited by 25
- 2025PromptLocate: Localizing Prompt Injection Attackscited by 23
- 2025ASIDE: Architectural Separation of Instructions and Data in Language Modelscited by 21
31 more
- 2026A Framework for Formalizing LLM Agent Securitycited by 16
- 2025Enabling Self-Improving Agents to Learn at Test Time With Human-In-The-Loop Guidancecited by 14
- 2026VIGIL: Defending LLM Agents Against Tool Stream Injection via Verify-Before-Commitcited by 13
- 2025CommandSans: Securing AI Agents with Surgical Precision Prompt Sanitizationcited by 12
- 2026WebSentinel: Detecting and Localizing Prompt Injection Attacks for Web Agentscited by 10
- 2026AgentSys: Secure and Dynamic LLM Agents Through Explicit Hierarchical Memory Managementcited by 10
- 2025EVA: Evolving Semantic Adversaries for Red-Teaming GUI Agents Against Environmental Injection Attackscited by 8
- 2026Defense Against Indirect Prompt Injection via Tool Result Parsingcited by 8
- 2026EvoClinician: A Self-Evolving Agent for Multi-Turn Medical Diagnosis via Test-Time Evolutionary Learningcited by 8
- 2025Context Reasoner: Incentivizing Reasoning Capability for Contextualized Privacy and Safety Compliance via Reinforcement Learningcited by 7
- 2025Taxonomy, Evaluation and Exploitation of IPI-Centric LLM Agent Defense Frameworkscited by 7
- 2025From ASR to ASP: Evaluating Prompt Attack Vulnerabilities Against Open-Source LLMscited by 6
- 2026Evaluating Privilege Usage of Agents with Real-World Toolscited by 4
- 2025Exploiting Web Search Tools of AI Agents for Data Exfiltrationcited by 3
- 2026Who Tests the Testers? Systematic Enumeration and Coverage Audit of LLM Agent Tool Call Safetycited by 2
- 2026IntraGuard: Committee-Side Defenses Against Review Outsourcing to Commercial Chatbotscited by 2
- 2026WebTrap: Stealthy Mid-Task Hijacking of Browser Agents During Navigationcited by 2
- 2026Securing LLM Agents Need Intent-to-Execution Integritycited by 2
- 2025Your Mailbox Is Mine: Prompt Injection Attacks Against Real-World LLM Email Agentscited by 1
- 2026RedVisor: Reasoning-Aware Prompt Injection Defense via Zero-Copy KV Cache Reusecited by 1
- 2026Depth Charge: Jailbreak Large Language Models from Deep Safety Attention Headscited by 1
- 2026Are GUI Agents Focused Enough? Automated Distraction via Semantic-level UI Element Injectioncited by 1
- 2026Isolation as a First-Class Principle for LLM-Agent System Safety: Concepts, Taxonomy, Challenges and Future Directionscited by 1
- 2026PVDetector: Detecting Prompt Injection Attacks on Purpose-Specific LLM Agents through Policy-Violation Concept Analysiscited by 1
- 2026CLASP: Defending Hybrid Large Language Models Against Hidden State Poisoning Attackscited by 0
- 2026ContextLens: Modeling Imperfect Privacy and Safety Context for Legal Compliancecited by 0
- 2026Beyond Explicit Refusals: Soft-Failure Attacks on Retrieval-Augmented Generationcited by 0
- 2026BadSKP: Backdoor Attacks on Knowledge Graph-Enhanced LLMs with Soft Promptscited by 0
- 2026Governing Execution Risk in Agentic AI Systems: A Trajectory-Guided Framework for Red Teamingcited by 0
- 2026Implicit Manipulation for Skill Selection in LLM Agents with Semantic Matchingcited by 0
- 2026Rethinking Indirect Prompt Injection as a Test-Time Search Problemcited by 0
- 2026Rethinking Indirect Prompt Injection as a Test-Time Search Problem3 Sep 2026
- 2026Implicit Manipulation for Skill Selection in LLM Agents with Semantic Matching2 Sep 2026
- 2026PVDetector: Detecting Prompt Injection Attacks on Purpose-Specific LLM Agents through Policy-Violation Concept Analysis14 Jul 2026
- 2026Isolation as a First-Class Principle for LLM-Agent System Safety: Concepts, Taxonomy, Challenges and Future Directions14 Jul 2026
- 2026Governing Execution Risk in Agentic AI Systems: A Trajectory-Guided Framework for Red Teaming23 Jun 2026
- 2026Securing LLM Agents Need Intent-to-Execution Integrity16 May 2026
- 2026BadSKP: Backdoor Attacks on Knowledge Graph-Enhanced LLMs with Soft Prompts12 May 2026
- 2026WebTrap: Stealthy Mid-Task Hijacking of Browser Agents During Navigation8 May 2026
- 2026IntraGuard: Committee-Side Defenses Against Review Outsourcing to Commercial Chatbots6 May 2026
- 2026Beyond Explicit Refusals: Soft-Failure Attacks on Retrieval-Augmented Generation20 Apr 2026
- 2026ContextLens: Modeling Imperfect Privacy and Safety Context for Legal Compliance14 Apr 2026
- 2026Are GUI Agents Focused Enough? Automated Distraction via Semantic-level UI Element Injection9 Apr 2026
31 more
- 2026Evaluating Privilege Usage of Agents with Real-World Tools30 Mar 2026
- 2026A Framework for Formalizing LLM Agent Security19 Mar 2026
- 2026Who Tests the Testers? Systematic Enumeration and Coverage Audit of LLM Agent Tool Call Safety18 Mar 2026
- 2026CLASP: Defending Hybrid Large Language Models Against Hidden State Poisoning Attacks12 Mar 2026
- 2026Depth Charge: Jailbreak Large Language Models from Deep Safety Attention Heads6 Mar 2026
- 2026Zombie Agents: Persistent Control of Self-Evolving LLM Agents via Self-Reinforcing Injections17 Feb 2026
- 2026The Landscape of Prompt Injection Threats in LLM Agents: From Taxonomy to Analysis11 Feb 2026
- 2026AgentSys: Secure and Dynamic LLM Agents Through Explicit Hierarchical Memory Management7 Feb 2026
- 2026WebSentinel: Detecting and Localizing Prompt Injection Attacks for Web Agents3 Feb 2026
- 2026RedVisor: Reasoning-Aware Prompt Injection Defense via Zero-Copy KV Cache Reuse2 Feb 2026
- 2026EvoClinician: A Self-Evolving Agent for Multi-Turn Medical Diagnosis via Test-Time Evolutionary Learning30 Jan 2026
- 2026VIGIL: Defending LLM Agents Against Tool Stream Injection via Verify-Before-Commit9 Jan 2026
- 2026Defense Against Indirect Prompt Injection via Tool Result Parsing8 Jan 2026
- 2025Taxonomy, Evaluation and Exploitation of IPI-Centric LLM Agent Defense Frameworks19 Nov 2025
- 2025Agentic AI Security: Threats, Defenses, Evaluation, and Open Challenges27 Oct 2025
- 2025EvoTest: Evolutionary Test-Time Learning for Self-Improving Agentic Systems15 Oct 2025
- 2025PromptLocate: Localizing Prompt Injection Attacks14 Oct 2025
- 2025Exploiting Web Search Tools of AI Agents for Data Exfiltration10 Oct 2025
- 2025CommandSans: Securing AI Agents with Surgical Precision Prompt Sanitization9 Oct 2025
- 2025IPIGuard: A Novel Tool Dependency Graph-Based Defense Against Indirect Prompt Injection in LLM Agents21 Aug 2025
- 2025AgentArmor: Enforcing Program Analysis on Agent Runtime Trace to Defend Against Prompt Injection2 Aug 2025
- 2025Enabling Self-Improving Agents to Learn at Test Time With Human-In-The-Loop Guidance23 Jul 2025
- 2025Your Mailbox Is Mine: Prompt Injection Attacks Against Real-World LLM Email Agents3 Jul 2025
- 2025MCIP: Protecting MCP Safety via Model Contextual Integrity Protocol20 May 2025
- 2025Context Reasoner: Incentivizing Reasoning Capability for Contextualized Privacy and Safety Compliance via Reinforcement Learning20 May 2025
- 2025From ASR to ASP: Evaluating Prompt Attack Vulnerabilities Against Open-Source LLMs20 May 2025
- 2025EVA: Evolving Semantic Adversaries for Red-Teaming GUI Agents Against Environmental Injection Attacks20 May 2025
- 2025Defending against Indirect Prompt Injection by Instruction Detection8 May 2025
- 2025Safety in Large Reasoning Models: A Survey24 Apr 2025
- 2025Advances and Challenges in Foundation Agents: From Brain-Inspired Intelligence to Evolutionary, Collaborative, and Safe Systems31 Mar 2025
- 2025ASIDE: Architectural Separation of Instructions and Data in Language Models13 Mar 2025
- 2025Advances and Challenges in Foundation Agents: From Brain-Inspired Intelligence to Evolutionary, Collaborative, and Safe Systemscited by 125
- 2025IPIGuard: A Novel Tool Dependency Graph-Based Defense Against Indirect Prompt Injection in LLM Agentscited by 46
- 2026Zombie Agents: Persistent Control of Self-Evolving LLM Agents via Self-Reinforcing Injectionscited by 44
- 2025AgentArmor: Enforcing Program Analysis on Agent Runtime Trace to Defend Against Prompt Injectioncited by 39
- 2025EvoTest: Evolutionary Test-Time Learning for Self-Improving Agentic Systemscited by 34
- 2025Agentic AI Security: Threats, Defenses, Evaluation, and Open Challengescited by 26
- 2026The Landscape of Prompt Injection Threats in LLM Agents: From Taxonomy to Analysiscited by 25
- 2026A Framework for Formalizing LLM Agent Securitycited by 16
- 2025Enabling Self-Improving Agents to Learn at Test Time With Human-In-The-Loop Guidancecited by 14
- 2026VIGIL: Defending LLM Agents Against Tool Stream Injection via Verify-Before-Commitcited by 13
- 2025CommandSans: Securing AI Agents with Surgical Precision Prompt Sanitizationcited by 12
- 2026WebSentinel: Detecting and Localizing Prompt Injection Attacks for Web Agentscited by 10
12 most cited of 26 All 26 (JSON)
- 2026Implicit Manipulation for Skill Selection in LLM Agents with Semantic Matching2 Sep 2026
- 2026PVDetector: Detecting Prompt Injection Attacks on Purpose-Specific LLM Agents through Policy-Violation Concept Analysis14 Jul 2026
- 2026Isolation as a First-Class Principle for LLM-Agent System Safety: Concepts, Taxonomy, Challenges and Future Directions14 Jul 2026
- 2026Governing Execution Risk in Agentic AI Systems: A Trajectory-Guided Framework for Red Teaming23 Jun 2026
- 2026Securing LLM Agents Need Intent-to-Execution Integrity16 May 2026
- 2026Are GUI Agents Focused Enough? Automated Distraction via Semantic-level UI Element Injection9 Apr 2026
- 2026Evaluating Privilege Usage of Agents with Real-World Tools30 Mar 2026
- 2026A Framework for Formalizing LLM Agent Security19 Mar 2026
- 2026Who Tests the Testers? Systematic Enumeration and Coverage Audit of LLM Agent Tool Call Safety18 Mar 2026
- 2026Zombie Agents: Persistent Control of Self-Evolving LLM Agents via Self-Reinforcing Injections17 Feb 2026
- 2026The Landscape of Prompt Injection Threats in LLM Agents: From Taxonomy to Analysis11 Feb 2026
- 2026AgentSys: Secure and Dynamic LLM Agents Through Explicit Hierarchical Memory Management7 Feb 2026
12 newest of 26 All 26 (JSON)
- 2025PromptLocate: Localizing Prompt Injection Attackscited by 23
- 2025ASIDE: Architectural Separation of Instructions and Data in Language Modelscited by 21
- 2025From ASR to ASP: Evaluating Prompt Attack Vulnerabilities Against Open-Source LLMscited by 6
- 2026Depth Charge: Jailbreak Large Language Models from Deep Safety Attention Headscited by 1
- 2026BadSKP: Backdoor Attacks on Knowledge Graph-Enhanced LLMs with Soft Promptscited by 0
- 2026Rethinking Indirect Prompt Injection as a Test-Time Search Problemcited by 0
- 2026Rethinking Indirect Prompt Injection as a Test-Time Search Problem3 Sep 2026
- 2026BadSKP: Backdoor Attacks on Knowledge Graph-Enhanced LLMs with Soft Prompts12 May 2026
- 2026Depth Charge: Jailbreak Large Language Models from Deep Safety Attention Heads6 Mar 2026
- 2025PromptLocate: Localizing Prompt Injection Attacks14 Oct 2025
- 2025From ASR to ASP: Evaluating Prompt Attack Vulnerabilities Against Open-Source LLMs20 May 2025
- 2025ASIDE: Architectural Separation of Instructions and Data in Language Models13 Mar 2025
- 2025MCIP: Protecting MCP Safety via Model Contextual Integrity Protocolcited by 33
- 2026EvoClinician: A Self-Evolving Agent for Multi-Turn Medical Diagnosis via Test-Time Evolutionary Learningcited by 8
- 2026IntraGuard: Committee-Side Defenses Against Review Outsourcing to Commercial Chatbotscited by 2
- 2026WebTrap: Stealthy Mid-Task Hijacking of Browser Agents During Navigationcited by 2
- 2026ContextLens: Modeling Imperfect Privacy and Safety Context for Legal Compliancecited by 0
- 2026WebTrap: Stealthy Mid-Task Hijacking of Browser Agents During Navigation8 May 2026
- 2026IntraGuard: Committee-Side Defenses Against Review Outsourcing to Commercial Chatbots6 May 2026
- 2026ContextLens: Modeling Imperfect Privacy and Safety Context for Legal Compliance14 Apr 2026
- 2026EvoClinician: A Self-Evolving Agent for Multi-Turn Medical Diagnosis via Test-Time Evolutionary Learning30 Jan 2026
- 2025MCIP: Protecting MCP Safety via Model Contextual Integrity Protocol20 May 2025