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
TurboPentest's agentic pentest is powerful and covers a broad range of issues automatically. This particular class is best confirmed in a manual IntegSec engagement, where human pentesters apply deeper methodology and a larger context window than any automated pass.
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?
TurboPentest's agentic pentest is powerful and covers a broad range of issues automatically. This particular class is best confirmed in a manual IntegSec engagement, where human pentesters apply deeper methodology and a larger context window than any automated pass.
Related CWEs
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 $99 pentest