Prompt Injection as Role Confusion

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Ye, Charles, Cui, Jasmine, Hadfield-Menell, Dylan
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866918530856779776
author Ye, Charles
Cui, Jasmine
Hadfield-Menell, Dylan
author_facet Ye, Charles
Cui, Jasmine
Hadfield-Menell, Dylan
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2603_12277
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Prompt Injection as Role Confusion
Ye, Charles
Cui, Jasmine
Hadfield-Menell, Dylan
Computation and Language
Artificial Intelligence
Cryptography and Security
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.
title Prompt Injection as Role Confusion
topic Computation and Language
Artificial Intelligence
Cryptography and Security
url https://arxiv.org/abs/2603.12277