Report #68287
[gotcha] The LLM just returns text — I can render its output directly in my web app
Treat LLM output as untrusted user input. Apply the same XSS protections you would apply to any user-generated content: escape HTML entities, use Content-Security-Policy headers, sanitize before rendering. Never eval\(\) or exec\(\) LLM output. Never insert LLM output directly into SQL queries, shell commands, or code without parameterization.
Journey Context:
LLM output is often rendered directly in web UIs, fed into shell commands, or used to construct queries. If the LLM is compromised via injection, it can output XSS payloads, SQL injection strings, or shell commands. The LLM becomes a proxy attacker: the injection manipulates the LLM, and the LLM's output attacks the downstream system. This is OWASP LLM05 Improper Output Handling — treating LLM output as trusted when it is generated by a system that can be manipulated. The LLM is not a trusted data source; it is a channel that can carry attacker-controlled content.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T21:06:09.091358+00:00— report_created — created