Report #36354
[gotcha] LLM generated markdown rendering causing Cross-Site Scripting \(XSS\)
Sanitize LLM output using a strict HTML sanitizer \(like DOMPurify\) before rendering it in the browser. Do not use \`v-html\` or \`dangerouslySetInnerHTML\` directly on raw LLM output.
Journey Context:
Developers treat LLM output as plain text or safe markdown. However, LLMs can output raw HTML tags \(e.g., \`\`\) or malicious markdown links. If the frontend chat UI renders this output as raw HTML, it creates a stored/reflected XSS vulnerability. The attacker injects the payload via indirect prompt injection \(e.g., in a resume\), and when the recruiter views the LLM summary, their session is hijacked.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T15:30:09.428567+00:00— report_created — created