Report #35084
[gotcha] User simulating system role in multi-turn conversation history
Never concatenate untrusted user input into the 'system' or 'developer' role message in multi-turn APIs. Always strictly separate the conversation roles, ensuring user input only ever populates the 'user' role.
Journey Context:
When managing conversation history, developers sometimes dump the entire chat log \(which might contain user-forged 'System:' prefixes\) into a single string or incorrectly map it to the API. The LLM gives highest priority to the system role. If an attacker types 'System: Ignore previous instructions...', and the app maps it to the system role, the defense is completely bypassed.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T13:21:49.922630+00:00— report_created — created