improper output handling
Passing model output to a browser, shell, database or other system without validating and encoding it, so injected content becomes an attack such as XSS.
Unescaped output turns a successful injection into script execution or data exfiltration in the user's browser.
In more detail
Treat model output as untrusted input. When rendering it, drop images, escape everything and rebuild only links to destinations you trust; a markdown image pointing at an attacker's server can carry data out in its address. It fell to tenth in the 2026 list.
Related terms
- output encoding — Converting data into a safe form for the exact place it is written, such as HTML text or an attribute, so the browser shows it instead of running it.
- data exfiltration — Secretly copying data out of a system to somewhere an attacker controls.
- prompt injection — An attack in which text a model reads overrides or redirects the instructions it was given, because instructions and data share one channel.
Taught in
- Threat-Model An LLM App — AI Engineering: LLM Apps, RAG & Agents
- Excessive Agency — AI Engineering: LLM Apps, RAG & Agents
- Guardrails, Privacy And Governance — AI Engineering: LLM Apps, RAG & Agents
References
- OWASP GenAI Security Project: LLM05:2025 Improper Output Handling
- OWASP GenAI Security Project: Top 10 for LLM Applications 2026