CWE WEAKNESSES / CWE-253
CWE-253
Incorrect Check of Function Return Value
Base EXPLOIT LIKELIHOOD: LOW
What it is
The product incorrectly checks a return value from a function, which prevents it from detecting errors or exceptional conditions.
Important and common functions will return some value about the success of its actions. This will alert the program whether or not to handle any errors caused by that function.
Impact
| Availability, Integrity | Unexpected State, DoS: Crash, Exit, or Restart |
Mitigations
- [Architecture and Design] Use a language or compiler that uses exceptions and requires the catching of those exceptions.
- [Implementation] Properly check all functions which return a value.
- [Implementation] When designing any function make sure you return a value or throw an exception in case of an error.
Real-world CVE examples
- CVE-2023-49286 — Chain: function in web caching proxy does not correctly check a return value (CWE-253) leading to a reachable assertion (CWE-617)
Related weaknesses
Test & detect
Browse all common weaknesses, check related exploited CVEs, or map to ATT&CK techniques.
Source: MITRE CWE. View on cwe.mitre.org →