Prompt Injection as Role Confusion
On the map: LLM safety and security → Prompt injection and agent security
Abstract (arXiv)
LLMs see the world as a single stream of text, partitioned into roles like <user> or <tool>. We trace prompt injection to role confusion: models perceive the source of text from how it sounds, not its labeled role. A command hidden in a webpage hijacks an agent simply because it sounds like <user> text, despite its <tool> label. We design role probes to measure how LLMs internally perceive "who is speaking," and find that injected text occupies the same representational space as the trusted role it imitates. We demonstrate this with CoT Forgery, a zero-shot attack that injects fabricated reasoning into user prompts and tool outputs. Models mistake the forgery for their own thoughts, yielding 60% attack success against frontier models with near-zero baselines. Strikingly, the degree of role confusion predicts attack success before a single token is generated. This mechanism generalizes beyond CoT Forgery to standard agent prompt injections, revealing prompt injection as a measurable consequence of role perception. To the model, sounding like a role is indistinguishable from being one. Project page and writeup: https://role-confusion.github.io
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. Builds on 49 of its 69 references that are in the map. First posted on arXiv 22 Feb 2026.
Builds on
49 of 69 references.
Closest ancestors · 19
Same direction, newest first
- 2025DRIP: Defending Prompt Injection via Token-wise Representation Editing and Residual Instruction Fusion1 Nov
- 2025RL Is a Hammer and LLMs Are Nails: A Simple Reinforcement Learning Recipe for Strong Prompt Injection6 Oct
- 2025ChatInject: Abusing Chat Templates for Prompt Injection in LLM Agents26 Sep
- 2025PromptSleuth: Detecting Prompt Injection via Semantic Intent Invariance28 Aug
- 2025Stronger Enforcement of Instruction Hierarchy via Augmented Intermediate Representations25 May
- 2025Defending against Indirect Prompt Injection by Instruction Detection8 May
- 2025Robustness via Referencing: Defending against Prompt Injection Attacks by Referencing the Executed Instruction29 Apr
- 2025ASIDE: Architectural Separation of Instructions and Data in Language Models13 Mar
- 2025Adaptive Attacks Break Defenses Against Indirect Prompt Injection Attacks on LLM Agents27 Feb
- 2025MELON: Provable Defense Against Indirect Prompt Injection Attacks in AI Agents7 Feb
- 2024Instructional Segment Embedding: Improving LLM Safety with Instruction Hierarchy9 Oct
- 2024SecAlign: Defending Against Prompt Injection with Preference Optimization7 Oct
7 more
- 2024The Instruction Hierarchy: Training LLMs to Prioritize Privileged Instructions19 Apr
- 2024Defending Against Indirect Prompt Injection Attacks With Spotlighting20 Mar
- 2024An Early Categorization of Prompt Injection Attacks on Large Language Models31 Jan
- 2023Tensor Trust: Interpretable Prompt Injection Attacks from an Online Game2 Nov
- 2023Ignore This Title and HackAPrompt: Exposing Systemic Vulnerabilities of LLMs through a Global Scale Prompt Hacking Competition24 Oct
- 2023Prompt Injection attack against LLM-integrated Applications8 Jun
- 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection23 Feb
Other references · 30
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 2,914
- 2023Jailbroken: How Does LLM Safety Training Fail?cited by 1,565
- 2023Jailbreaking Black Box Large Language Models in Twenty Queriescited by 1,326
- 2016Understanding intermediate layers using linear classifier probescited by 1,279
- 2023Language Models Don't Always Say What They Think: Unfaithful Explanations in Chain-of-Thought Promptingcited by 1,081
- 2021Probing Classifiers: Promises, Shortcomings, and Advancescited by 831
- 2022Discovering Latent Knowledge in Language Models Without Supervisioncited by 733
- 2019Designing and Interpreting Probes with Control Taskscited by 608
- 2024How Johnny Can Persuade LLMs to Jailbreak Them: Rethinking Persuasion to Challenge AI Safety by Humanizing LLMscited by 533
- 2024Dolma: an Open Corpus of Three Trillion Tokens for Language Model Pretraining Researchcited by 475
18 more
- 2024A StrongREJECT for Empty Jailbreakscited by 352
- 2025Layer by Layer: Uncovering Hidden Representations in Language Modelscited by 293
- 2024Deliberative Alignment: Reasoning Enables Safer Language Modelscited by 292
- 2023ToxicChat: Unveiling Hidden Challenges of Toxicity Detection in Real-World User-AI Conversationcited by 224
- 2021Mind the Style of Text! Adversarial and Backdoor Attacks Based on Text Style Transfercited by 147
- 2025The Attacker Moves Second: Stronger Adaptive Attacks Bypass Defenses Against Llm Jailbreaks and Prompt Injectionscited by 108
- 2024Does Refusal Training in LLMs Generalize to the Past Tense?cited by 74
- 2024Can LLMs Separate Instructions From Data? And What Do We Even Mean By That?cited by 70
- 2025From Hard Refusals to Safe-Completions: Toward Output-Centric Safety Trainingcited by 49
- 2025IHEval: Evaluating Language Models on Following the Instruction Hierarchycited by 48
- 2025Control Illusion: The Failure of Instruction Hierarchies in Large Language Modelscited by 31
- 2024ChatBug: A Common Vulnerability of Aligned LLMs Induced by Chat Templatescited by 29
- 2024SysBench: Can Large Language Models Follow System Messages?cited by 26
- 2025Dialogue Injection Attack: Jailbreaking LLMs through Context Manipulationcited by 13
- 2025Invitation Is All You Need! Promptware Attacks Against LLM-Powered Assistants in Production Are Practical and Dangerouscited by 11
- 2025Self-Jailbreaking: Language Models Can Reason Themselves Out of Safety Alignment After Benign Reasoning Trainingcited by 9
- 2025The Illusion of Role Separation: Hidden Shortcuts in LLM Role Learning (and How to Fix Them)cited by 6
- 2025Strong but Brittle: Simple Attacks Subvert Reasoning-based Safety Guardrailscited by 2
Built on by
Citing papers per year: 2026: 11.
11 papers.
- 2026GPT-Red: Automated Red Teaming via Self-Play at Scalecited by 5
- 2026POLAR-Bench: A Diagnostic Benchmark for Privacy-Utility Trade-offs in LLM Agentscited by 4
- 2026Your Agentic LLMs Secretly Encode Indirect Prompt-Injection Exposure in Hidden Statescited by 3
- 2026Prompt Injection Detection is Regime-Dependent: A Deployment-Aware Evaluation with Interpretable Structural Signalscited by 0
- 2026Persistent Sparse Autoencoders: Learning Feature-Specific Timescales in Language Model Representationscited by 0
- 2026PIPES: Securing Agent Perception with Provenance and Priorscited by 0
- 2026Workspace Topology as an Attack Vector in Agentic Coding Assistantscited by 0
- 2026Share-Borne AI Virus: Memory-Hopping Attacks Across LLM Agentscited by 0
- 2026Render Before Reading: Visual Rendering as a Prompt Injection Defensecited by 0
- 2026CounterSteer: Suppressing Indirect Prompt Injection with Activation Steeringcited by 0
- 2026Selecting The Most Informative Tokens in Natural Language Autoencoderscited by 0
- 2026Selecting The Most Informative Tokens in Natural Language Autoencoders29 Sep 2026
- 2026CounterSteer: Suppressing Indirect Prompt Injection with Activation Steering29 Sep 2026
- 2026Render Before Reading: Visual Rendering as a Prompt Injection Defense28 Sep 2026
- 2026Share-Borne AI Virus: Memory-Hopping Attacks Across LLM Agents28 Sep 2026
- 2026Workspace Topology as an Attack Vector in Agentic Coding Assistants14 Aug 2026
- 2026PIPES: Securing Agent Perception with Provenance and Priors13 Aug 2026
- 2026Your Agentic LLMs Secretly Encode Indirect Prompt-Injection Exposure in Hidden States1 Aug 2026
- 2026GPT-Red: Automated Red Teaming via Self-Play at Scale28 Jul 2026
- 2026Persistent Sparse Autoencoders: Learning Feature-Specific Timescales in Language Model Representations19 Jul 2026
- 2026Prompt Injection Detection is Regime-Dependent: A Deployment-Aware Evaluation with Interpretable Structural Signals26 May 2026
- 2026POLAR-Bench: A Diagnostic Benchmark for Privacy-Utility Trade-offs in LLM Agents18 May 2026
Similar, not cited
Close in wording, no citation either way
- 2026Readable Before Actionable: Causal Tracing of Indirect Prompt Injection
- 2026Same Payload, Different Channel: Measuring Trust Asymmetry in Tool-Using Language Models
- 2026AgentDrift: A Step-Labeled Benchmark of Injection-Hijacked LLM Agent Trajectories
- 2026AgentSecBench: Measuring Prompt Injection, Privacy Leakage, and Tool-Use Integrity in LLM Agents
- 2026Control-Token Injection Suppresses Chain-of-Thought and Defeats Reasoning-Based Oversight in Tool-Using Agents
- 2026Same Bytes, Different Authority: Reserved-Token Representations in Chat-Template Prompt Injection
- 2026The Claws in Plain Sight: Unauthorized Context Disclosure through LLM Agent Tool Calls
- 2026The Self-Correction Illusion: Role Relabeling Gates Explicit Error Flagging in Large Language Models