1. CVE archive
  2. Vulnerability types
  3. CWE-252
CWE-252 · #134 most frequent type in the archive

Unchecked Return Value

The product does not check the return value from a method or function.

Part of: CWE-754 · Improper Check for Unusual or Exceptional Conditions

198CVEs of this type in the archive
14critical (CVSS ≥ 9)
84high severity (7–8.9)
Nov 30, 2026latest published

What it is

The product does not check the return value from a method or function.

Impact on systems

ScopeImpact
Availability, Integrity Unexpected State, Varies by Context, DoS: Crash, Exit, or Restart
The product could be prevented from detecting unexpected states and conditions, placing the product into a state that could lead to a crash or other unintended behaviors.
Access Control Bypass Protection Mechanism
If the method/function is used for a protection mechanism, then an unchecked return value could prevent the code from being able to see if the protection mechanism fails. For example, if the program calls a function to drop privileges but does not check the return code to ensure that privileges were successfully dropped, then the program will continue to operate with the higher privileges.

How to prevent it

Implementation Check the results of all functions that return a value and verify that the value is expected.
Implementation For any pointers that could have been modified or provided from a function that can return NULL, check the pointer for NULL before use. When working with a multithreaded or otherwise asynchronous environment, ensure that proper locking APIs are used to lock before the check, and unlock when it has finished.
Implementation Ensure that you account for all possible return values from the function.
Implementation When designing a function, make sure you return a value or throw an exception in case of an error.

Source: MITRE CWE catalog · Official entry on the MITRE website

CWE-252 CVEs published per year

2026: year in progress, updated every hour

Show the data as a table
YearCVE
20041
20051
20072
20091
20101
20176
20184
20197
20208
202120
202228
202315
202422
202517
202665

All CWE-252 CVEs

198 results

Dottor Marc

Is this type of vulnerability in your systems?

An archive tells you what exists; a Vulnerability Assessment tells you what is exposed on your side. Dottor Marc tests your web applications and network with automated and manual checks.