CyberSecBulletin

Use of NullPointerException Catch to Detect NULL Pointer Dereference

CWE-395

Catching NullPointerException should not be used as an alternative to programmatic checks to prevent dereferencing a null pointer.

We track 5 vulnerabilities of this type. 100% are rated high or critical, and the average CVSS score is 8.5.

How this weakness is prevented

  • Architecture and Design Implementation: Do not extensively rely on catching exceptions (especially for validating user input) to handle errors. Handling exceptions can decrease the performance of an application.

Latest Use of NullPointerException Catch to Detect NULL Pointer Dereference vulnerabilities