cs.AIFeb 24, 2026

ICON: Indirect Prompt Injection Defense for Agents based on Inference-Time Correction

Authors: Che Wang, Fuyao Zhang, Jiaming Zhang, Ziqi Zhang, Yinghui Wang, Longtao Huang, Jianbo Gao, Zhong Chen, +1 more

Organizations: School of Computer Science, Peking University, China · College of Computing and Data Science, Nanyang Technological University, Singapore · Ant Group · Alibaba

Abstract

Large Language Model (LLM) agents are susceptible to Indirect Prompt Injection (IPI) attacks, where malicious instructions in retrieved content hijack the agent's execution. Existing defenses typically rely on strict filtering or refusal mechanisms, which suffer from a critical limitation: over-refusal, prematurely terminating valid agentic workflows. We propose ICON, a probing-to-mitigation framework that neutralizes attacks while preserving task continuity. Our key insight is that IPI attacks leave distinct over-focusing signatures in the latent space. We introduce a Latent Space Trace Prober to detect attacks based on high intensity scores. Subsequently, a Mitigating Rectifier performs surgical attention steering that selectively manipulate adversarial query key dependencies while amplifying task relevant elements to restore the LLM's functional trajectory. Extensive evaluations on multiple backbones show that ICON achieves a competitive 0.4% ASR, matching commercial grade detectors, while yielding a over 50% task utility gain. Furthermore, ICON demonstrates robust Out of Distribution(OOD) generalization and extends effectively to multi-modal agents, establishing a superior balance between security and efficiency.

Figures & tables

Explore similar work

CardsList
  1. AgentSentry: Mitigating Indirect Prompt Injection in LLM Agents via Temporal Causal Diagnostics and Context Purification

    Feb 26, 2026Tian Zhang, Yiwei Xu, Juan Wang +8Prompt Injection DefensePrompt Injection Attacks on AI Agents

  2. ActGuard: Pre-execution Action Auditing against Indirect Prompt Injection in LLM Agents

    Sep 14, 2026Bingzheng Wang, Xiaoyan Gu, Wentao Wang +3Runtime Enforcement for AI AgentsPrompt Injection Defense

  3. IterInject: Indirect Prompt Injection Against LLM Agents via Feedback-Guided Iterative Optimization

    May 23, 2026Zixuan Chen, Jiaxiang Chen, Li Luo +4LLM Agent SecurityIndirect Prompt Injection