CVE-2021-42340
CVE-2021-42340 — DoS via memory leak with WebSocket connections
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.
Published Updated Sources: cvelistV5, apache
Triage
Is it exploited, how likely is exploitation, what does it touch, and how severe do the scoring sources call it.
Exploitation
Unreported
no source claims exploitation
EPSS
11%
chance of exploitation in 30 days
CVSS base
Unscored
no source published a base score
Affected scope
The catalog records vendors and products as separate lists, not pairs, so which product belongs to which vendor is not something this page can say.
Vendors (1)
Products (1)
Weakness & attack patterns
- CWE-772
Attack patterns reported against this CVE. The ATT&CK techniques below are inferred from its weakness class.
- T1499.002Endpoint Denial of Service: Service Exhaustion Flood
References
9 on the record
- lists.apache.org/thread.html/r83a35be60f06aca2065f188ee542b9099695d57ced2e70e0885f905c%40%3Cannounce.tomcat.apache.org%3E
x_refsource_MISC
- lists.apache.org/thread.html/r8097a2d1550aa78e585fc77e602b9046e6d4099d8d132497c5387784%40%3Ccommits.myfaces.apache.org%3E
mailing-list, x_refsource_MLIST
- www.debian.org/security/2021/dsa-5009
vendor-advisory, x_refsource_DEBIAN
- www.oracle.com/security-alerts/cpujan2022.html
x_refsource_MISC
- security.netapp.com/advisory/ntap-20211104-0001/
x_refsource_CONFIRM
- kc.mcafee.com/corporate/index?page=content&id=SB10379
x_refsource_CONFIRM
- www.oracle.com/security-alerts/cpuapr2022.html
x_refsource_MISC
- www.oracle.com/security-alerts/cpujul2022.html
x_refsource_MISC
Related CVEs
Same product first, then the same weakness or threat actor.
- CVE-2025-24813 Apache Tomcat: Potential RCE and/or information disclosure and/or information corruption with partial PUTCVSS 9.8 · CISA KEV
- CVE-2020-1938 Apache Tomcat Improper Privilege Management VulnerabilityCVSS 9.8 · CISA KEV
- CVE-2017-12617 Apache Tomcat Remote Code Execution VulnerabilityCVSS 8.1 · CISA KEV
- CVE-2017-12615 Apache Tomcat on Windows Remote Code Execution VulnerabilityCVSS 8.1 · CISA KEV
- CVE-2026-34486 Apache Tomcat: Fix for CVE-2026-29146 allowed bypass of EncryptInterceptorCVSS 7.5 · CISA KEV
- CVE-2026-55957 Apache Tomcat: Authentication bypass with JNDIRealm and GSSAPI authenticated bindCVSS 7.3
Elsewhere on this site
Not in any source we poll
Listed rather than left blank: an empty field and an unmeasured one look identical on screen, and only one is a reason to look elsewhere.
- No confirmed IOCs, IP addresses, domains, file hashes, or malware artifacts supplied.
- No organization-specific asset inventory, compensating-control status, or patch deployment evidence supplied.
- No exploit packet captures, log samples, or incident case IDs supplied.