CVE-2021-42340: DoS via memory leak with WebSocket connections
Vulnerability summary
CVE-2021-42340 is a high (CVSS 7.5) vulnerability in apache software foundation apache tomcat. EPSS estimates a 11.80% chance of exploitation in the next 30 days, higher than 96% of scored vulnerabilities.
Severe, CVSS 7.5 (NVD); no exploitation reported by the 5 checked sources; EPSS 12% (FIRST, 03-11-2026)
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 2Timeline
- 14-10-2021PublishedVulnerability first disclosed.
- 04-08-2024Last modifiedVulnerability information updated.
Description
The fix for bug 63362 present in Apache Tomcat 10.1.0-M1 to 10.1.0-M5, 10.0.0-M1 to 10.0.11, 9.0.40 to 9.0.53 and 8.5.60 to 8.5.71 introduced a memory leak. The object introduced to collect metrics for HTTP upgrade connections was not released for WebSocket connections once the connection was closed. This created a memory leak that, over time, could lead to a denial of service via an OutOfMemoryError.
CVSS metrics
6 scores · 5 sources · 2 versions- OSV · Red hatEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- OSV · UbuntuEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- OSV · DebianEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- OSV · MavenEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS trend
Probability
11.80%
Chance of exploitation in the next 30 days
Percentile
96%
Versus all other CVEs
30-day change
No change 0.00 pp
From 11.80% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Oracle13 products
- agile_engineering_data_management6.2.1.0
- big_data_spatial_and_graph< 23.1
- communications_diameter_signaling_router≥ 8.0.0.0, ≤ 8.5.0.2
- hospitality_cruise_shipboard_property_management_system20.1.0
- managed_file_transfer12.2.1.3.0 | 12.2.1.4.0
Debian2 products
- tomcat9< 9.0.43-2~deb11u3 | < 9.0.54-1
- debian_linuxEOL11.0
Netapp2 products
Redhat2 products
- pki-servlet-4.0-api< 1:9.0.50-1.el9
- pki-servlet-engine< 1:9.0.50-1.el9
Ubuntu2 products
- tomcat8All versions (No fix recorded)
- tomcat9All versions (No fix recorded)
Apache1 product
- tomcatEOL≥ 8.5.60, < 8.5.72 | ≥ 9.0.40, < 9.0.54 | ≥ 10.0.1, < 10.0.12 | 10.0.0:milestone10 | 10.1.0:milestone1 | 10.1.0:milestone2 | 10.1.0:milestone3 | 10.1.0:milestone4 | 10.1.0:milestone5
Apache software foundation1 product
- apache tomcatApache Tomcat 10 10.0.0-M10 to 10.0.11 | Apache Tomcat 10 10.1.0-M1 to 10.1.0-M5 | Apache Tomcat 9 9.0.40 to 9.0.53 | Apache Tomcat 8 8.5.60 to 8.5.71
Org.apache.tomcat1 product
- tomcat≥ 10.1.0-M1, < 10.1.0-M6 | ≥ 10.0.0-M1, < 10.0.12 | ≥ 9.0.40, < 9.0.54 | ≥ 8.5.60, < 8.5.72
8 vendors · 24 products
References
34 linksShow all 34 references
- github.com/apache/tomcatPACKAGE