Skip to content

CWE-391: Unchecked Error Condition

BaseLikelihood of exploit: Medium

[PLANNED FOR DEPRECATION. SEE MAINTENANCE NOTES AND CONSIDER CWE-252, CWE-248, OR CWE-1069.] Ignoring exceptions and other error conditions may allow an attacker to induce unexpected behavior unnoticed.

Consequences

  • Integrity, Other: Varies by Context, Unexpected State, Alter Execution Logic

How to prevent it

  • Requirements: The choice between a language which has named or unnamed exceptions needs to be done. While unnamed exceptions exacerbate the chance of not properly dealing with an exception, named exceptions suffer from the up call version of the weak base class problem.
  • Requirements: A language can be used which requires, at compile time, to catch all serious exceptions. However, one must make sure to use the most current version of the API as new exceptions could be added.
  • Implementation: Catch all relevant exceptions. This is the recommended solution. Ensure that all exceptions are handled in such a way that you can be sure of the state of your system at any given moment.

Recent advisories

  • PYSEC-2026-3772 — openssl_encrypt versions before 1.4.0 contain a critical vulnerability in pqc.py where KEM decapsulation failures silently fall back to simulation mode,…
  • GHSA-9gvj-pp9x-gcfr — Picklescan has pickle parsing logic flaw that leads to malicious pickle file bypass
  • GHSA-xcpr-7mr4-h4xq — Apache Tomcat - Authentication Bypass
  • GHSA-3chw-8jq2-w769 — Froxlor contains Unchecked Error Condition

All advisories for CWE-391

Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor