---
title: "CWE-248: Uncaught Exception"
url: https://radicalnotion.ai/cwe/cwe-248
type: cwe
description: "An exception is thrown from a function, but it is not caught."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-248: Uncaught Exception

- **Abstraction:** Base
- **Structure:** Simple
- **Status:** Draft
- **CVEs with this as primary weakness:** 391
- **Of those, in CISA KEV:** 0
- **New in 2026:** 213
- **CWE catalog version:** 4.21

## Description

An exception is thrown from a function, but it is not caught.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Implementation | - |

## Applicable platforms

**Languages:** C++ (Undetermined), Java (Undetermined), C# (Undetermined)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Availability, Confidentiality | DoS: Crash, Exit, or Restart, Read Application Data | An uncaught exception could cause the system to be placed in a state that could lead to a crash, exposure of sensitive information, or other unintended behaviors. |

## Potential mitigations

### 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.

## 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.)

Effectiveness: High

## 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 \_alloca() function allocates memory on the stack. If an allocation request is too large for the available stack space, \_alloca() throws an exception. If the exception is not caught, the program will crash, potentially enabling a denial of service attack. \_alloca() has been deprecated as of Microsoft Visual Studio 2005(R). It has been replaced with the more secure \_alloca\_s().

### Example 3

EnterCriticalSection() can raise an exception, potentially causing the program to crash. Under operating systems prior to Windows 2000, the EnterCriticalSection() function can raise an exception in low memory situations. If the exception is not caught, the program will crash, potentially enabling a denial of service attack.

## 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-2023-21087 | Java code in a smartphone OS can encounter a "boot loop" due to an uncaught exception |

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

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2025-12423 | Denial of Service - Protocol Manipulation | critical | 10.0 | - | No | 2025-10-28 |
| CVE-2018-11466 | Uncaught Exception in ICSA-18-345-02 Siemens SINUMERIK Controllers | critical | 9.8 | - | No | 2018-12-12 |
| CVE-2024-42037 | Vulnerability of uncaught exceptions in the Graphics module | critical | 9.3 | - | No | 2024-08-08 |
| CVE-2026-92954 | vm2 3.10.0 through 3.11.7 Denial of Service via Host Promise | critical | 9.2 | - | No | 2026-09-17 |
| CVE-2025-53620 | Crashing any Qwik Server | critical | 9.2 | - | No | 2025-07-09 |
| CVE-2026-100722 | vm2 before 3.12.2 Host Process Termination via Construct Trap | high | 8.9 | - | No | 2026-09-27 |
| CVE-2026-61666 | websocket-driver: Denial of service via malformed Host header | high | 8.9 | - | No | 2026-08-17 |
| CVE-2023-0790 | Uncaught Exception in thorsten/phpmyfaq | high | 8.8 | - | No | 2023-02-12 |
| CVE-2026-133245 | parse5 7.0.0 before 8.1.1 Denial of Service via Preprocessor#\_processSurrogate | high | 8.7 | - | No | 2026-11-19 |
| CVE-2026-123562 | Devalue 5.8.0 before 5.9.3 Denial of Service via stringifyAsync Unhandled Rejection | high | 8.7 | - | No | 2026-11-08 |
| CVE-2026-122315 | Kyverno before 1.19.2 Image Verification Bypass via Attestation Type Panic | high | 8.7 | - | No | 2026-11-05 |
| CVE-2026-122314 | Kyverno before 1.19.2 Denial of Service via Shallow Variable Substitution Panic | high | 8.7 | - | No | 2026-11-05 |

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-703](https://radicalnotion.ai/cwe/cwe-703) | Improper Check or Handling of Exceptional Conditions |
| Parent | [CWE-705](https://radicalnotion.ai/cwe/cwe-705) | Incorrect Control Flow Scoping |
| Parent | [CWE-755](https://radicalnotion.ai/cwe/cwe-755) | Improper Handling of Exceptional Conditions |
| Child | [CWE-600](https://radicalnotion.ai/cwe/cwe-600) | Uncaught Exception in Servlet |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| 7 Pernicious Kingdoms | Often Misused: Exception Handling | - | - |
| The CERT Oracle Secure Coding Standard for Java (2011) | Do not let checked exceptions escape from a finally block | ERR05-J | - |
| The CERT Oracle Secure Coding Standard for Java (2011) | Do not throw undeclared checked exceptions | ERR06-J | - |
| SEI CERT Perl Coding Standard | Do not suppress or ignore exceptions | EXP31-PL | Exact |
| Software Fault Patterns | Unchecked Status Condition | SFP4 | - |

## Frequently asked questions

### What is CWE-248?

An exception is thrown from a function, but it is not caught.

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

391 recorded CVEs are attributed to CWE-248, including CVE-2025-12423, CVE-2018-11466 and CVE-2024-42037.

### How do you prevent CWE-248?

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.

### How is CWE-248 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-248?

Exploiting CWE-248 can lead to: DoS: Crash, Exit, or Restart, Read Application Data.

### Is CWE-248 actively exploited?

391 recorded CVEs are caused by CWE-248; none are currently in CISA's KEV catalog of actively exploited flaws.

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

---

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