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
HighAttack 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
Downstream Impact
Improper output handling can cascade through multiple system components, amplifying the impact of vulnerabilities and making them harder to detect and mitigate.