1. CVE archive
  2. Vulnerability types
  3. CWE-395
CWE-395 · #390 most frequent type in the archive

Use of NullPointerException Catch to Detect NULL Pointer Dereference

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

Part of: CWE-705 · Incorrect Control Flow Scoping

12CVEs of this type in the archive
2critical (CVSS ≥ 9)
2high severity (7–8.9)
Jan 12, 2026latest published

What it is

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

Impact on systems

ScopeImpact
Availability DoS: Resource Consumption (CPU)
Other Quality Degradation

How to prevent it

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.

Source: MITRE CWE catalog · Official entry on the MITRE website

CWE-395 CVEs published per year

2026: year in progress, updated every hour

Show the data as a table
YearCVE
20221
20248
20252
20261

All CWE-395 CVEs

12 results

Dottor Marc

Is this type of vulnerability in your systems?

An archive tells you what exists; a Vulnerability Assessment tells you what is exposed on your side. Dottor Marc tests your web applications and network with automated and manual checks.