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.
How it's found
Unchecked Return Value to NULL Pointer Dereference only appears when several contributing weaknesses combine. Testers look for each contributing condition separately, then chain them together to confirm the combined weakness is actually reachable and exploitable.
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.
Consequences
- DoS: Crash, Exit, or Restart
- Execute Unauthorized Code or Commands, Read Memory, Modify Memory: 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.
Where this fits in a TurboPentest engagement
This weakness is not covered by the automated black-box pentest. IntegSec pentesters cover it in a manual engagement.
Frequently asked questions
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.
How do you find Unchecked Return Value to NULL Pointer Dereference?
Unchecked Return Value to NULL Pointer Dereference only appears when several contributing weaknesses combine. Testers look for each contributing condition separately, then chain them together to confirm the combined weakness is actually reachable and exploitable.
What is the impact of CWE-690?
DoS: Crash, Exit, or Restart Execute Unauthorized Code or Commands, Read Memory, Modify Memory: 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.
Does TurboPentest test for Unchecked Return Value to NULL Pointer Dereference?
This weakness is not covered by the automated black-box pentest. IntegSec pentesters cover it in a manual engagement.
Related CWEs
Written and reviewed by
Michel Chamberland - Founder & CEO, IntegSec
CISSP, OSCP, OSCE, CEH, GIAC, CCSK · 20+ years in offensive security
Michel has spent 20+ years on offensive security teams including IBM X-Force Red and Trustwave SpiderLabs, leading penetration tests, red team engagements, and breach response for Fortune 500 customers. He is the founder of IntegSec and the architect of TurboPentest.
Find these issues before an attacker does
TurboPentest runs an agentic AI pentest against your target and reports findings with proof, from $99 per target.
Start a pentest