CWE•Base•Stable•20 recent CVEs
CWE-476NULL Pointer Dereference
Description
The product dereferences a pointer that it expects to be valid but is NULL.
Common consequences
- Availability→DoS: Crash, Exit, or RestartNULL pointer dereferences usually result in the failure of the process unless exception handling (on some platforms) is available and implemented. Even when exception handling is being used, it can still be very difficult to return the soft
- Integrity,Confidentiality→Execute Unauthorized Code or Commands,Read Memory,Modify MemoryIn 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.
Potential mitigations
- ImplementationFor 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 [REF-1484].
- RequirementsSelect a programming language that is not susceptible to these issues.
- ImplementationCheck the results of all functions that return a value and verify that the value is non-null before acting upon it.
- Architecture and DesignIdentify 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.
- ImplementationExplicitly initialize all variables and other data stores, either during declaration or just before the first usage.
Related CWEs
Recent CVEs classified under this CWE
CVE-2026-32387.52026-06-08CVE-2025-604775.02026-06-03CVE-2026-80357.12026-06-02CVE-2026-102983.32026-06-01CVE-2025-596067.82026-06-01CVE-2025-596047.82026-06-01CVE-2026-285814.02026-06-01CVE-2025-700997.52026-06-01CVE-2026-457294.32026-06-01CVE-2026-372307.52026-06-01CVE-2026-372267.52026-06-01CVE-2025-604955.52026-06-01CVE-2025-604855.52026-06-01CVE-2025-604835.52026-06-01CVE-2025-604815.52026-06-01CVE-2026-101993.32026-05-31CVE-2026-101983.32026-05-31CVE-2026-101973.32026-05-31CVE-2026-465277.52026-05-29CVE-2026-451512026-05-29