---
title: "CWE-755: Improper Handling of Exceptional Conditions"
url: https://radicalnotion.ai/cwe/cwe-755
type: cwe
description: "The product does not handle or incorrectly handles an exceptional condition."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-755: Improper Handling of Exceptional Conditions

- **Abstraction:** Class
- **Structure:** Simple
- **Status:** Incomplete
- **Likelihood of exploit:** Medium
- **CVEs with this as primary weakness:** 443
- **Of those, in CISA KEV:** 3
- **New in 2026:** 46
- **CWE catalog version:** 4.21

## Description

The product does not handle or incorrectly handles an exceptional condition.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Implementation | REALIZATION: This weakness is caused during implementation of an architectural security tactic. |

## Applicable platforms

**Languages:** Python (Undetermined)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Other | Other | - |

## Detection methods

### Automated Static Analysis

Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

## Demonstrative examples

### Example 1

The following example attempts to resolve a hostname.

Bad code:

```java
protected void doPost (HttpServletRequest req, HttpServletResponse res) throws IOException {
    String ip = req.getRemoteAddr();
    InetAddress addr = InetAddress.getByName(ip);
    ...
    out.println("hello " + addr.getHostName());
}
```

A DNS lookup failure will cause the Servlet to throw an exception.

### Example 2

The following example attempts to allocate memory for a character. After the call to malloc, an if statement is used to check whether the malloc function failed.

Bad code:

```c
foo=malloc(sizeof(char)); //the next line checks to see if malloc failed
if (foo==NULL) {
    //We do nothing so we just ignore the error.
}
```

Good code:

```c
foo=malloc(sizeof(char)); //the next line checks to see if malloc failed
if (foo==NULL) {
    printf("Malloc failed to allocate memory resources");
    return -1;
}
```

### Example 3

The following code mistakenly catches a NullPointerException.

Bad code:

```java
try {
    mysteryMethod();
} catch (NullPointerException npe) {
}
```

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2023-41151 | SDK for OPC Unified Architecture (OPC UA) server has uncaught exception when a socket is blocked for writing but the server tries to send an error |
| CVE-2021-3011 | virtual interrupt controller in a virtualization product allows crash of host by writing a certain invalid value to a register, which triggers a fatal error instead of returning an error code |
| CVE-2008-4302 | Chain: OS kernel does not properly handle a failure of a function call (CWE-755), leading to an unlock of a resource that was not locked (CWE-832), with resultant crash. |

## Real CVEs with this weakness (sample of 12 of 443)

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2017-5638 | Apache Struts vulnerable to remote arbitrary command execution due to improper input validation | critical | 10.0 | - | Yes | 2017-03-11 |
| CVE-2020-7247 | OpenSMTPD Remote Code Execution Vulnerability | critical | 9.3 | - | Yes | 2020-01-29 |
| CVE-2021-38003 | Inappropriate implementation in V8 | high | 8.7 | - | Yes | 2021-11-23 |
| CVE-2024-11698 | firefox: thunderbird: Fullscreen Lock-Up When Modal Dialog Interrupts Transition on macOS | critical | 9.8 | - | No | 2024-11-26 |
| CVE-2024-7521 | mozilla: Incomplete WebAssembly exception handing | critical | 9.8 | - | No | 2024-08-06 |
| CVE-2022-48673 | net/smc: Fix possible access to freed memory in link clear | critical | 9.8 | - | No | 2024-05-03 |
| CVE-2024-26584 | net: tls: handle backlogging of crypto requests | critical | 9.8 | - | No | 2024-02-21 |
| CVE-2021-42141 | - | critical | 9.8 | - | No | 2024-01-22 |
| CVE-2023-38406 | ffr: Flowspec overflow in bgpd/bgp\_flowspec.c | critical | 9.8 | - | No | 2023-11-06 |
| CVE-2023-21409 | Insufficient file permissions leak administrator-privileged credentials in AXIS License Verifier ACAP | critical | 9.8 | - | No | 2023-08-03 |
| CVE-2023-21408 | Insufficient file permissions leak user credentials of 3rd party integration interfaces in AXIS License Verifier ACAP | critical | 9.8 | - | No | 2023-08-03 |
| CVE-2023-28631 | Attacker controlled data in AST nodes is not validated in comrak | critical | 9.8 | - | No | 2023-03-28 |

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-703](https://radicalnotion.ai/cwe/cwe-703) | Improper Check or Handling of Exceptional Conditions |
| Child | [CWE-209](https://radicalnotion.ai/cwe/cwe-209) | Generation of Error Message Containing Sensitive Information |
| Child | [CWE-248](https://radicalnotion.ai/cwe/cwe-248) | Uncaught Exception |
| Child | [CWE-274](https://radicalnotion.ai/cwe/cwe-274) | Improper Handling of Insufficient Privileges |
| Child | [CWE-280](https://radicalnotion.ai/cwe/cwe-280) | Improper Handling of Insufficient Permissions or Privileges |
| Child | [CWE-333](https://radicalnotion.ai/cwe/cwe-333) | Improper Handling of Insufficient Entropy in TRNG |
| Child | [CWE-390](https://radicalnotion.ai/cwe/cwe-390) | Detection of Error Condition Without Action |
| Child | [CWE-392](https://radicalnotion.ai/cwe/cwe-392) | Missing Report of Error Condition |
| Child | [CWE-395](https://radicalnotion.ai/cwe/cwe-395) | Use of NullPointerException Catch to Detect NULL Pointer Dereference |
| Child | [CWE-396](https://radicalnotion.ai/cwe/cwe-396) | Declaration of Catch for Generic Exception |
| Child | [CWE-460](https://radicalnotion.ai/cwe/cwe-460) | Improper Cleanup on Thrown Exception |
| Child | [CWE-544](https://radicalnotion.ai/cwe/cwe-544) | Missing Standardized Error Handling Mechanism |
| Child | [CWE-636](https://radicalnotion.ai/cwe/cwe-636) | Not Failing Securely |
| Child | [CWE-756](https://radicalnotion.ai/cwe/cwe-756) | Missing Custom Error Page |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| OpenSSF Secure Coding Guide for Python | Handle Error Conditions | pyscg-0015 | - |

## Frequently asked questions

### What is CWE-755?

The product does not handle or incorrectly handles an exceptional condition.

### What CVEs are caused by CWE-755?

443 recorded CVEs are attributed to CWE-755, including CVE-2017-5638, CVE-2020-7247 and CVE-2021-38003. 3 are listed in CISA's Known Exploited Vulnerabilities (KEV) catalog.

### How is CWE-755 detected?

Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

### What are the consequences of CWE-755?

Exploiting CWE-755 can lead to: Other.

### Is CWE-755 actively exploited?

Yes. 3 CWE-755 vulnerabilities are in CISA's KEV catalog of actively exploited flaws, out of 443 recorded CVEs.

Primary source: [MITRE CWE](https://cwe.mitre.org/data/definitions/755.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/cwe/cwe-755). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
