Report #69653
[gotcha] LLM output contains unescaped markdown or HTML that executes XSS
Always sanitize LLM output as if it were user input before rendering it in a browser. Use a strict markdown parser that disallows raw HTML.
Journey Context:
Developers assume LLM output is safe text. But if the LLM is prompted \(via injection\) to output script tags or raw HTML, and the frontend uses dangerouslySetInnerHTML or an unsafe markdown renderer, it results in XSS. LLM output must be treated as untrusted user input.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T23:23:44.344334+00:00— report_created — created