Report #45089
[gotcha] Raw LLM markdown output rendered without sanitizing links or URL schemes
Sanitize LLM output markdown, enforcing rel="noopener noreferrer", validating URL schemes \(only allowing http/https\), and disabling javascript: schemes.
Journey Context:
LLMs often output markdown. An attacker uses prompt injection to force the LLM to output \[Click here\]\(javascript:alert\(1\)\) or \[https://safe.com\]\(https://evil.com\). If the frontend blindly renders this markdown, it leads to Cross-Site Scripting \(XSS\) or phishing, compromising the user's session through the LLM's output vector.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T06:09:08.980496+00:00— report_created — created