Report #24312
[gotcha] LLM confusing untrusted user data with system instructions despite delimiters
Use robust data marking \(e.g., XML tags with random IDs\) and explicitly instruct the LLM that data within those tags is untrusted and should never be interpreted as instructions, combined with output validation.
Journey Context:
Developers use simple delimiters \(like triple backticks or 'User data:'\) to separate instructions from data. LLMs often ignore these delimiters if the untrusted data contains compelling instructions or closing delimiters. Using randomly generated, unique XML tags for each request makes it statistically impossible for the attacker to guess the delimiter and inject a closing tag, significantly reducing injection success.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T19:12:39.718978+00:00— report_created — created