HackerPapers

arXiv:2603.12277cs.CL

Prompt Injection as Role Confusion

Charles Ye, Jasmine Cui, Dylan Hadfield-Menell

Abstract

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

arXiv comments
ICML 2026
Journal reference
Proceedings of the 43rd International Conference on Machine Learning, PMLR 306:148172-148202, 2026
DOI
Subjects
cs.CLComputation and Language cs.AIArtificial Intelligence cs.CRCryptography and Security

On Hacker News

Linked by 4 identifiable commenters in 6 comments across 5 threads, from Apr 2026 to Aug 2026. Found in 1 HN submission from Jun 2026 to Jun 2026. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments5 threads

    • A natural next step is to use the reasoning traces to jailbreak the stronger models (https://arxiv.org/pdf/2603.12277)

      benobView on HNParent context

    • Because nobody has figured out how to make that work 100% reliably yet. The current approach is to use delimiters that are special tokens that can't be represented in regular text: https://github.com/openai/harmony/blob/main/docs/format.md#s... Then you train your model to take…

      simonwView on HNParent context

    • People will keep hiding reasoning because it allows prompt injection https://arxiv.org/pdf/2603.12277, in addition to facilitating distillation (you don't pay the full cost of RL)

      benobView on HNParent context

  1. Claude mixes up who said what 2 comments
    • >Several people questioned whether this is actually a harness bug like I assumed, as people have reported similar issues using other interfaces and models, including chatgpt.com. One pattern does seem to be that it happens in the so-called “Dumb Zone” once a conversation starts…

      puppystenchView on HNParent context

    • I believe you're right, it's an issue of the model misinterpreting things that sound like user message as actual user messages. It's a known phenomenon: https://arxiv.org/abs/2603.12277

      puppystenchView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.