Loading module...
Loading module...
OWASP-10
Improper handling of errors and exceptional conditions can lead to security vulnerabilities.
Mishandling exceptional conditions happens when programs fail to prevent, detect, and respond to unusual and unpredictable situations, leading to crashes, unexpected behavior, and vulnerabilities.
Impact: New category for 2025 with 24 CWEs. Focuses on improper error handling, logical errors, failing open, and scenarios from abnormal conditions systems encounter.
Generation of error messages containing sensitive information (CWE-209).
Failure to handle missing parameters (CWE-234).
Improper handling of insufficient privileges (CWE-274).
NULL pointer dereference causing crashes (CWE-476).
Not failing securely - 'failing open' instead of 'failing closed' (CWE-636).
Missing, poor, or incomplete input validation allowing exceptional conditions.
High-level error handling instead of at functions where errors occur.
Unexpected environmental states (memory, privilege, network issues).
Inconsistent or missing exception handling, allowing system to fall into unknown state.
Application catches exceptions when files are uploaded but doesn't properly release resources.
Attack: Each exception leaves resources locked or unavailable. Attacker repeatedly triggers exceptions until all resources exhausted.
Impact: Complete denial of service, application becomes unresponsive.
Application reveals full system errors to users when database errors occur.
Attack: Attacker forces errors to use sensitive system information for reconnaissance. Uses error messages to craft better SQL injection attacks.
Impact: Information disclosure enables more sophisticated attacks.
Multi-step financial transaction doesn't properly roll back when interrupted.
Transaction Order:
Attack: Attacker interrupts transaction via network disruptions. System doesn't roll back entire transaction (fail closed).
Impact: Attacker could drain user's account, or race condition allowing money to be sent to destination multiple times.
Have global exception handler in place for anything missed.
If part way through transaction, roll back every part and start again. Never attempt to recover transaction part way through.
Consider whether identical repeated errors above certain rate should be outputted as statistics showing frequency and timeframe.
Strict input validation with sanitization or escaping for potentially hazardous characters.
Entire organization should handle exceptional conditions the same way for easier review and audit.
Content adapted from OWASP Top 10:2025, licensed under CC BY-SA 4.0