CWE-396: Declaration of Catch for Generic Exception
Catching overly broad exceptions promotes complex error handling code that is more likely to contain security vulnerabilities.
Last updated
Overview
Multiple catch blocks can get ugly and repetitive, but "condensing" catch blocks by catching a high-level class like Exception can obscure exceptions that deserve special treatment or that should not be caught at this point in the program. Catching an overly broad exception essentially defeats the purpose of a language's typed exceptions, and can become particularly dangerous if the program grows and begins to throw new types of exceptions. The new exception types will not receive any attention.
Real-world CVEs
2 recorded CVEs are caused by CWE-396 (Declaration of Catch for Generic Exception). The highest-severity and most recent are shown first. 2 new CWE-396 CVEs have been recorded so far in 2026.
Common consequences
What can happen when CWE-396 is exploited.