English

Prompt Injection as Role Confusion

Computation and Language 2026-04-17 v4 Artificial Intelligence Cryptography and Security

Abstract

Language models remain vulnerable to prompt injection attacks despite extensive safety training. We trace this failure to role confusion: models infer the source of text based on how it sounds, not where it actually comes from. A command hidden in a webpage hijacks an agent simply because it sounds like a user instruction. This is not just behavioral: in the model's internal representations, text that sounds like a trusted source occupies the same space as text that actually is one. We design role probes which measure how models internally perceive "who is speaking", showing that attacker-controllable signals (e.g. syntactic patterns, lexical choice) control role perception. We first test this with CoT Forgery, a zero-shot attack that injects fabricated reasoning into user prompts or ingested webpages. Models mistake the text for their own thoughts, yielding 60% attack success on StrongREJECT across frontier models with near-0% baselines. Strikingly, the degree of role confusion strongly predicts attack success. We then generalize these results to standard agent prompt injections, introducing a unifying framework that reframes prompt injection not as an ad-hoc exploit but as a measurable consequence of how models represent role.

Keywords

Cite

@article{arxiv.2603.12277,
  title  = {Prompt Injection as Role Confusion},
  author = {Charles Ye and Jasmine Cui and Dylan Hadfield-Menell},
  journal= {arXiv preprint arXiv:2603.12277},
  year   = {2026}
}
R2 v1 2026-07-01T11:17:21.263Z