OWASP Evolution

Improper Output HandlingLLM10: Improper Output Handling · 2026

Using unvalidated outputs in systems or renderers causes injection, exfiltration or code execution, including insecure generated code.

Summary

Using unvalidated outputs in systems or renderers causes injection, exfiltration or code execution, including insecure generated code.

How the attack works

LLM10 · How the attack worksGenerated output is inserted directly into the browser; untrusted HTML may execute code in the application’s origin.ModelHTML outputinnerHTMLBrowserUnvalidated output

Generated output is inserted directly into the browser; untrusted HTML may execute code in the application’s origin.

Example

Vulnerable · Pseudocode
answer = await llm(user_prompt)
panel.innerHTML = answer

Fix: Use textContent for text; if HTML is permitted, sanitize it and apply encoding for the destination context.

Prevention

  • Validate and encode every output for its destination.
  • Block external resources and disallowed control characters.
  • Review and test generated code before executing it.

Lineage

  1. 2025 · LLM05: Improper Output Handling Moves down to rank 10 in 2026
  2. 2026 · LLM10: Improper Output Handling Moves down from rank 5
  • 2025:LLM05 → 2026:LLM10: Improper Output Handling moves down from rank 5 to 10.

Sources

Buy me a coffee

OWASP Evolution

Editions
Continues / movesContinues RenamedRenamed Merged / expandedMerged