Defending against Adaptive Prompt Injection Attacks via Reasoning-enabled Task Alignment
On the map: LLM reasoning → Reasoning for agents, planning and code
also in 2 more
Abstract (arXiv)
Indirect prompt injection attacks hijack LLM-based agents by embedding malicious instructions in third-party data that the agent retrieves during task execution. Existing defenses report near-zero attack success rate on static benchmarks, yet recent adaptive evaluations show that these results collapse once the attacker is allowed to optimize against the deployed defense. In this work, we trace this collapse to two failure modes. First, existing defense methods are confined to recognizing specific attack patterns, rather than assessing whether the intent of every embedded instruction is relevant to the user task. Second, training-based defenses, which otherwise offer the strongest safety-utility trade-off, assemble their adversarial examples from a handful of hand-crafted templates, and the resulting defender fails to generalize outside that narrow strategy distribution. To address these gaps, we propose RETA, a training-based method that grounds defense decisions on the user tasks rather than attacker-controlled data. At each tool-output step, the defender undertakes chain-of-thought reasoning verifying that its actions are consistent with the user task. Leveraging red-teaming, a simulated attacker synthesizes adversarial training data and receives a dictionary-learning diversity reward, achieving broad coverage of injection-reformulation strategies. Together, these allow the defender to be optimized via multi-objective reinforcement learning and achieve better safety-utility trade-off. Across six black-box adaptive attacks, RETA keeps every per-attack ASR below 10%, with average ASR of 2.92% and 3.75% on the two target models, while preserving most utility under attack and on clean inputs.
Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 4 of its 47 references that are in the map. First posted on arXiv 13 Jun 2026.
Builds on
4 of 47 references.
References · 4
- 2026GDPO: Group reward-Decoupled Normalization Policy Optimization for Multi-reward RL Optimizationcited by 193
- 2025LlamaFirewall: An open source guardrail system for building secure AI agentscited by 127
- 2026Learning to Inject: Automated Prompt Injection via Reinforcement Learningcited by 16
- 2025Adversarial D'ej`a Vu: Jailbreak Dictionary Learning for Stronger Generalization to Unseen Attackscited by 7
Built on by
Citing papers per year: 2026: 6.
6 papers.
- 2026CoER: Defending against Adaptive Indirect Prompt Injection via Adversarial Co-Evolution and Refinementcited by 2
- 2026ContainmentBench: Trace-Based Evaluation of Post-Exposure Containment in Tool-Using LLM Agentscited by 1
- 2026CoDeL: Co-Evolutionary Defense against Indirect Prompt Injection in LLM-based Agentscited by 0
- 2026CounterSteer: Suppressing Indirect Prompt Injection with Activation Steeringcited by 0
- 2026AdvSim2Real : Training Web Agents Against Adaptive Prompt Injection in a Web World Modelcited by 0
- 2026What Counts as the Same Task? Executable Contracts for Robustness Evaluation of Tool-Using Agentscited by 0
- 2026What Counts as the Same Task? Executable Contracts for Robustness Evaluation of Tool-Using Agents10 Oct 2026
- 2026AdvSim2Real : Training Web Agents Against Adaptive Prompt Injection in a Web World Model6 Oct 2026
- 2026CounterSteer: Suppressing Indirect Prompt Injection with Activation Steering29 Sep 2026
- 2026CoDeL: Co-Evolutionary Defense against Indirect Prompt Injection in LLM-based Agents28 Sep 2026
- 2026CoER: Defending against Adaptive Indirect Prompt Injection via Adversarial Co-Evolution and Refinement7 Sep 2026
- 2026ContainmentBench: Trace-Based Evaluation of Post-Exposure Containment in Tool-Using LLM Agents27 Jul 2026
Similar, not cited
Close in wording, no citation either way
- 2026Defense Against Indirect Prompt Injection via Tool Result Parsing
- 2026Mitigating Adaptive Attacks against Reasoning Models with Activation Consistency Training
- 2025Mitigating Indirect Prompt Injection via Instruction-Following Intent Analysis
- 2026Self-Reflection Fine-Tuning: Enhancing Agent Security against Prompt Injection Attacks from Failure Experience
- 2026Toward Metacognitive One-Shot Indirect Prompt Injection: Strategy Abstraction Via Outcome-Conditioned Reflection
- 2026RedVisor: Reasoning-Aware Prompt Injection Defense via Zero-Copy KV Cache Reuse
- 2026Assessing Automated Prompt Injection Attacks in Agentic Environments
- 2024The Task Shield: Enforcing Task Alignment to Defend Against Indirect Prompt Injection in LLM Agents