Skip to main content

CWE-476: NULL Pointer Dereference

BaseStableExploit Likelihood: Medium🏆 #11 in Top 25 (2024)

The product dereferences a pointer that it expects to be valid but is NULL.

View on MITRE
1,625Related CVEs
15.34Severity Score
Back to CWE Lookup

Technical Details

Structure
Simple

Applicable To

Languages
CC++JavaC#Go
Platforms

🏆 CWE Top 25 Historical Ranking

2023:#12
Score: 6.59
1,587 CVEs
2024:#11↑1
Score: 15.34
1,625 CVEs
Trend:Worsening (moved down 1 ranks)

Frequently Asked Questions

What is CWE-476: NULL Pointer Dereference?+

CWE-476: NULL Pointer Dereference is a Common Weakness Enumeration (CWE) entry maintained by MITRE. The product dereferences a pointer that it expects to be valid but is NULL.

Is CWE-476 in the CWE Top 25 Most Dangerous Software Weaknesses?+

Yes. CWE-476 ranked #11 in the CWE Top 25 for 2024, associated with 1,625 CVEs that year. The CWE Top 25 highlights the most common and impactful software weaknesses based on real-world vulnerability data.

What are the security consequences of NULL Pointer Dereference?+

If exploited, CWE-476 (NULL Pointer Dereference) it can compromise Availability, Integrity and Confidentiality, leading to outcomes such as DoS: Crash, Exit, or Restart, Execute Unauthorized Code or Commands, Read Memory and Modify Memory.

How do you prevent or mitigate NULL Pointer Dereference?+

Recommended mitigations for CWE-476 include: Select a programming language that is not susceptible to these issues. Check the results of all functions that return a value and verify that the value is non-null before acting upon it. Identify all variables and data stores that receive information from external sources, and apply input validation to make sure that they are only initialized to expected values.

Which programming languages are affected by NULL Pointer Dereference?+

CWE-476 commonly affects C, C++, Java, C# and Go. Note that weaknesses are often language-agnostic patterns, so secure coding practices apply broadly.

What are real-world examples of NULL Pointer Dereference?+

MITRE documents real CVEs mapped to CWE-476, including CVE-2002-1912, CVE-2005-0772, CVE-2009-4895, CVE-2020-29652 and CVE-2009-2692. You can look up the full details of each CVE, including CVSS scores and remediation guidance, on our CVE Lookup tool.

What is the difference between a CWE and a CVE?+

A CWE (Common Weakness Enumeration) like CWE-476 describes a category of software weakness — the underlying flaw type. A CVE (Common Vulnerabilities and Exposures) identifies a specific, real-world vulnerability in a particular product. In short, a CWE is the kind of mistake, and a CVE is an instance of that mistake being found in software.

Learn More