CounterSteer largely neutralizes instructional takeover: a black-box framing search cracks 3 of 18 development samples, and Parameter manipulation--attacker-chosen arguments in otherwise legitimate calls--is only partially resisted.
Abstract
Indirect prompt injection makes an LLM agent treat untrusted retrieved text as instructions. We present CounterSteer, an inference-time defense that suppresses this behavior inside the model. Per model, a five-step recipe fits a residual-stream direction from paired episodes differing only in whether an embedded instruction is followed, and retains it only if it passes pre-specified causal and capability gates. At deployment, the direction is subtracted from every tool-result token during prefill. The edit is always on--there is no detection decision to evade--and requires no fine-tuning, auxiliary model, or added tokens, only white-box serving and tool-result span boundaries. Across five open-weights models (8B-106B, five vendor lineages), held-out attack success falls from 0.21-1.00 undefended to 0.00-0.17 defended, and AgentDojo compromise rate from 0.10-0.49 to 0.006-0.079, at 93-100% typography-normalized benign utility, with larger task-dependent costs when reasoning over steered content. A benchmark-level adaptive attacker reaching 0.67-0.73 undefended is held to roughly a quarter of that on the two most deeply evaluated models. Among the defenses we measured on capable models, those achieving lower compromise rates either lost 22-89% of benign utility or fine-tuned the served weights. White-box gradient attacks through the deployed vector compromise at most 2 of 52 episodes, and none of 2,052 replayed human red-team attacks succeeds. CounterSteer largely neutralizes instructional takeover: a black-box framing search cracks 3 of 18 development samples. Parameter manipulation--attacker-chosen arguments in otherwise legitimate calls--is only partially resisted (13 of 18); the decision becomes linearly readable at argument emission but not at the examined pre-generation sites, and is not removed by the tested prefill- or decode-time steering, motivating argument-provenance controls.
The explosive prompt is introduced, a conditional payload that stays dormant until an attacker-chosen trigger is met, in effect a training-free, inference-time backdoor planted in a single piece of retrieved content.
Justin Szczepaniak, Elad Feldman, N. Viner et al.· arXiv.org· 0 citations
This work treats model self-arbitration as a capability rather than a security boundary and implements an external reference monitor combining authenticated source routing with capability-gated tool execution, deterministically rejects all tested forged, tampered, replayed, and unsigned requests while preserving legiti...
RAISED substantially reduces the attack success rate of prompt injections in tool responses while, unlike prior training-based defenses, preserving utility on both agentic and general-purpose benchmarks.
Mohamed Dhouib, Clément Elliker, Alexi Canesse et al.· 1 citation
Indirect prompt injection causes LLM agents to follow commands embedded in external data. A probe may distinguish instructions from data without identifying a state edit that changes the next action. We study this gap through counterfactual role probes, component-wise activation patching, and separate interventions on...
Zhen-Qiang Yu, Wen-Peng Xing, Xing-Xing Yang et al.· 0 citations
This paper proposes Secure On-Policy Distillation (SecOPD) that provides token-level feedback to guide defensive fine-tuning, and generalizes to domains completely unseen in training.
Yibo Peng, Long Lian, David A. Wagner et al.· 5 citations· ⚡1
CoDeL is presented, a defense that hardens agent against an attack distribution it reshapes as it trains, and reduces attack success rate (ASR) by 88.5% and outperforms other baselines largely (+38.0%).