CWE-690: Unchecked Return Value to NULL Pointer Dereference
The product does not check for an error after calling a function that can return with a NULL pointer if the function fails, which leads to a resultant NULL pointer dereference.
Last updated
Overview
While unchecked return value weaknesses are not limited to returns of NULL pointers (see the examples in CWE-252), functions often return NULL to indicate an error status. When this error condition is not checked, a NULL pointer dereference can occur.
Real-world CVEs
26 recorded CVEs are caused by CWE-690 (Unchecked Return Value to NULL Pointer Dereference). The highest-severity and most recent are shown first. 5 new CWE-690 CVEs have been recorded so far in 2026 (1 in 2025).
- CVE-2026-24411
iccDEV has Undefined Behavior and Null Pointer Deference in CIccTagXmlSegmentedCurve::ToXml()
High · CVSS 8.8 · EPSS 23th2026-01-24 - CVE-2026-24410
iccDEV has Undefined Behavior and Null Pointer Deference in CIccProfileXml::ParseBasic()
High · CVSS 8.8 · EPSS 23th2026-01-24 - CVE-2026-24409
iccDEV has Undefined Behavior and Null Pointer Deference in CIccTagXmlFloatNum ::ParseXml()
High · CVSS 8.8 · EPSS 23th2026-01-24 - CVE-2026-24404
iccDEV has Null Pointer Deference and Undefined Behavior in CIccXmlArrayType()
High · CVSS 8.8 · EPSS 32th2026-01-24 - CVE-2022-20682High · CVSS 8.6 · EPSS 67th2022-04-15
- CVE-2026-24160High · CVSS 7.5 · EPSS 37th2026-05-20
- CVE-2024-31196High · CVSS 7.5 · EPSS 34th2024-09-18
- CVE-2024-31185High · CVSS 7.5 · EPSS 36th2024-09-18
- CVE-2024-31182
NULL Pointer Dereference in libfluid_msg library
High · CVSS 7.5 · EPSS 36th2024-09-18 - CVE-2024-31175
NULL Pointer Dereference in libfluid_msg library
High · CVSS 7.5 · EPSS 42th2024-09-18 - CVE-2024-31167High · CVSS 7.5 · EPSS 42th2024-09-18
- CVE-2024-31165
NULL Pointer Dereference in libfluid_msg library
High · CVSS 7.5 · EPSS 42th2024-09-18
Showing 12 of 26 recorded CWE-690 CVEs. Track new ones as they are published and get AI-written analysis and fixes.
Monitor CWE-690 vulnerabilitiesCommon consequences
What can happen when CWE-690 is exploited.
DoS: Crash, Exit, or Restart
Affects: Availability
Execute Unauthorized Code or Commands, Read Memory, Modify Memory
Affects: Integrity, Confidentiality, Availability
In rare circumstances, when NULL is equivalent to the 0x0 memory address and privileged code can access it, then writing or reading memory is possible, which may lead to code execution.
How it happens
When it is introduced
Typically introduced during these phases of the software lifecycle.
Applies to
Languages
How to detect it
Black Box
This typically occurs in rarely-triggered error conditions, reducing the chances of detection during black box testing.
White Box
Code analysis can require knowledge of API behaviors for library functions that might return NULL, reducing the chances of detection when unknown libraries are used.
Automated Dynamic Analysis
Use tools that are integrated during compilation to insert runtime error-checking mechanisms related to memory safety errors, such as AddressSanitizer (ASan) for C/C++ [REF-1518].
Effectiveness: Moderate
Code examples
Illustrative examples from MITRE showing how the weakness appears in code.
The code below makes a call to the getUserName() function but doesn't check the return value before dereferencing (which may cause a NullPointerException).
Vulnerable example
String username = getUserName();This example takes an IP address from a user, verifies that it is well formed and then looks up the hostname and copies it into a buffer.
Vulnerable example
void host_lookup(char *user_supplied_addr){Illustrative examples
Real CVEs that MITRE cites as examples of this weakness.
- CVE-2008-1052 — Large Content-Length value leads to NULL pointer dereference when malloc fails.
- CVE-2006-6227 — Large message length field leads to NULL pointer dereference when malloc fails.
- CVE-2006-2555 — Parsing routine encounters NULL dereference when input is missing a colon separator.
- CVE-2003-1054 — URI parsing API sets argument to NULL when a parsing failure occurs, such as when the Referer header is missing a hostname, leading to NULL dereference.
- CVE-2008-5183 — chain: unchecked return value can lead to NULL dereference
Terminology & mappings
Mapped taxonomies
- CERT C Secure Coding: Do not dereference null pointers (EXP34-C) — CWE More Specific fit
- The CERT Oracle Secure Coding Standard for Java (2011): Do not catch NullPointerException or any of its ancestors (ERR08-J)
- SEI CERT Perl Coding Standard: Do not ignore function return values (EXP32-PL) — CWE More Specific fit
Frequently asked questions
Common questions about CWE-690.
- What is CWE-690?
- The product does not check for an error after calling a function that can return with a NULL pointer if the function fails, which leads to a resultant NULL pointer dereference.
- What CVEs are caused by CWE-690?
- 26 recorded CVEs are attributed to CWE-690, including CVE-2026-24411, CVE-2026-24410, CVE-2026-24409.
- How is CWE-690 detected?
- Black Box: This typically occurs in rarely-triggered error conditions, reducing the chances of detection during black box testing.
- What are the consequences of CWE-690?
- Exploiting CWE-690 can lead to: DoS: Crash, Exit, or Restart, Execute Unauthorized Code or Commands, Read Memory, Modify Memory.
- Is CWE-690 actively exploited?
- 26 recorded CVEs are caused by CWE-690; none are currently in CISA's KEV catalog of actively exploited flaws.
References
- MITRE CWE definition (CWE-690) (opens in a new tab)
- CWE-690 vulnerabilities on NVD (opens in a new tab)
- Learn: What is a CWE?
Weakness data is sourced from the MITRE CWE catalog (v4.20). CVE associations are aggregated and kept current by RadicalNotion.AI.
Stay ahead of CWE-690
Get alerted the moment a new CWE-690 vulnerability affects your stack, with AI-written analysis, severity context, and remediation guidance.