Understanding and Mitigating Role Spoofing in LLMs
TL;DR - This paper examines role spoofing, a prompt-injection attack that makes LLMs misattribute malicious tool output to a trusted user. It finds that models rely on both content and structural cues, and proposes linear probes to detect spoofing.
- Attacks combining fake structure with user-like semantics or writing style are especially effective.
- Adversarial training against content-based injection does not prevent structure-based attacks.
- Linear probes trained to predict conversational roles detect role spoofing across multiple settings.