Report #54132
[gotcha] Rendering un-sanitized LLM outputs containing markdown or HTML directly in a web UI
Sanitize LLM outputs before rendering in the frontend. Strip image tags or ensure image URLs are proxied/validated. Do not render raw markdown from LLM tool outputs without a strict allowlist.
Journey Context:
Developers focus on the LLM executing bad actions via tools, but miss that the LLM can output markdown that tricks the user's browser. If the LLM is tricked \(via indirect injection\) into outputting a markdown image link containing sensitive data from the context \(like a private API key\), the browser will fetch it, exfiltrating the data. This bypasses network-level tool restrictions because the exfiltration happens via the frontend.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T21:21:15.078428+00:00— report_created — created