Back to OWASP Top 10#5 High Risk

LLM05:2025 Improper Output Handling

Insufficient validation, sanitization, and handling of LLM outputs before they are passed downstream, leading to security vulnerabilities and system compromise.

Vulnerability Overview

Improper Output Handling occurs when LLM outputs are not properly validated, sanitized, or handled before being passed to downstream components, potentially leading to various security vulnerabilities.

Impact Level

High

Attack Vector

Output Processing

Exploitability

Medium

Code Injection

LLM outputs containing executable code that is processed without proper validation.

  • • SQL injection via generated queries
  • • Command injection in system calls
  • • Script injection in web applications
  • • Template injection attacks
Cross-Site Scripting (XSS)

Malicious scripts in LLM outputs that execute in user browsers when displayed.

  • • Reflected XSS in chat interfaces
  • • Stored XSS in generated content
  • • DOM-based XSS manipulation
  • • JavaScript payload execution