TopicAttack: An Indirect Prompt Injection Attack via Topic Transition
On the map: LLM safety and security → Prompt injection and agent security
Abstract (arXiv)
Large language models (LLMs) have shown remarkable performance across a range of NLP tasks. However, their strong instruction-following capabilities and inability to distinguish instructions from data content make them vulnerable to indirect prompt injection attacks. In such attacks, instructions with malicious purposes are injected into external data sources, such as web documents. When LLMs retrieve this injected data through tools, such as a search engine and execute the injected instructions, they provide misled responses. Recent attack methods have demonstrated potential, but their abrupt instruction injection often undermines their effectiveness. Motivated by the limitations of existing attack methods, we propose TopicAttack, which prompts the LLM to generate a fabricated conversational transition prompt that gradually shifts the topic toward the injected instruction, making the injection smoother and enhancing the plausibility and success of the attack. Through comprehensive experiments, TopicAttack achieves state-of-the-art performance, with an attack success rate (ASR) over 90% in most cases, even when various defense methods are applied. We further analyze its effectiveness by examining attention scores. We find that a higher injected-to-original attention ratio leads to a greater success probability, and our method achieves a much higher ratio than the baseline methods.
Key facts. Cited by 11 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 18 Jul 2025.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2026: 11.
11 papers.
- 2026AutoDojo: Adaptive Black-Box Attacks Reveal the Limits of IPI Defenses and Task-Specification Effects in LLM Agentscited by 4
- 2026WebAgentGuard: A Reasoning-Driven Guard Model for Detecting Prompt Injection Attacks in Web Agentscited by 3
- 2026WARD: Adversarially Robust Defense of Web Agents Against Prompt Injectionscited by 3
- 2026WebTrap: Stealthy Mid-Task Hijacking of Browser Agents During Navigationcited by 2
- 2026Securing LLM Agents Need Intent-to-Execution Integritycited by 2
- 2026Plant, Persist, Trigger: Sleeper Attack on Large Language Model Agentscited by 1
- 2026AliMark: Enhancing Robustness of Sentence-Level Watermarking Against Text Paraphrasingcited by 0
- 2026WebMCP Tool Surface Poisoning: Runtime Manipulation Attacks on LLM Agentscited by 0
- 2026KidnapRAG: A Black-Box Attack for Hijacking Reasoning in Agentic Retrieval-Augmented Generation Systemscited by 0
- 2026Know Your Agent: Reconnaissance-Driven Pentesting of AI Agentscited by 0
- 2026WebMCP-Phalanx: Enforcing and Characterizing Trust Boundaries for Browser-Integrated LLM Agentscited by 0
- 2026WebMCP-Phalanx: Enforcing and Characterizing Trust Boundaries for Browser-Integrated LLM Agents25 Aug 2026
- 2026Know Your Agent: Reconnaissance-Driven Pentesting of AI Agents22 Jul 2026
- 2026KidnapRAG: A Black-Box Attack for Hijacking Reasoning in Agentic Retrieval-Augmented Generation Systems1 Jul 2026
- 2026AutoDojo: Adaptive Black-Box Attacks Reveal the Limits of IPI Defenses and Task-Specification Effects in LLM Agents13 Jun 2026
- 2026WebMCP Tool Surface Poisoning: Runtime Manipulation Attacks on LLM Agents4 Jun 2026
- 2026AliMark: Enhancing Robustness of Sentence-Level Watermarking Against Text Paraphrasing28 May 2026
- 2026Plant, Persist, Trigger: Sleeper Attack on Large Language Model Agents27 May 2026
- 2026Securing LLM Agents Need Intent-to-Execution Integrity16 May 2026
- 2026WARD: Adversarially Robust Defense of Web Agents Against Prompt Injections14 May 2026
- 2026WebTrap: Stealthy Mid-Task Hijacking of Browser Agents During Navigation8 May 2026
- 2026WebAgentGuard: A Reasoning-Driven Guard Model for Detecting Prompt Injection Attacks in Web Agents14 Apr 2026