cve.bz

CVE-2021-42340

7.5 highEPSS 12%Fix available

High (7.5). EPSS 12% estimated probability of exploitation activity in the next 30 days. Fixed in org.apache.tomcat:tomcat 10.0.12, 10.1.0-M6, 8.5.72.

On this page
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.

Severity

CVSS 3.1

7.5 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS
12% (unchanged from 12% a week ago; 12% 30 days ago) estimated probability of exploitation activity in the next 30 days; 96th percentile. Scored 2026-11-21. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-772 Missing Release of Resource after Effective Lifetime
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-42340 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-42340?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-42340?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-42340 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
apache:tomcatfrom 8.5.60 before 8.5.72
apache:tomcatfrom 9.0.40 before 9.0.54
apache:tomcatfrom 10.0.1 before 10.0.12
apache:tomcat10.0.0:milestone10
apache:tomcat10.1.0:milestone1
apache:tomcat10.1.0:milestone2
apache:tomcat10.1.0:milestone3
apache:tomcat10.1.0:milestone4
apache:tomcat10.1.0:milestone5
debian:debian_linux11.0
oracle:agile_engineering_data_management6.2.1.0
oracle:big_data_spatial_and_graphbefore 23.1
oracle:communications_diameter_signaling_routerfrom 8.0.0.0 through 8.5.0.2
oracle:hospitality_cruise_shipboard_property_management_system20.1.0
oracle:managed_file_transfer12.2.1.3.0
oracle:managed_file_transfer12.2.1.4.0
oracle:middleware_common_libraries_and_tools12.2.1.4.0
oracle:payment_interface19.1
oracle:payment_interface20.3
oracle:retail_customer_insights15.0.2
oracle:retail_customer_insights16.0.2
oracle:retail_data_extractor_for_merchandising15.0.2
oracle:retail_data_extractor_for_merchandising16.0.2
oracle:retail_eftlink21.0.0
oracle:retail_financial_integration16.0.1
oracle:retail_financial_integration19.0.0
oracle:retail_store_inventory_management14.0.4.13
oracle:retail_store_inventory_management14.1.3.5
oracle:retail_store_inventory_management14.1.3.14
oracle:retail_store_inventory_management15.0.3.3
oracle:retail_store_inventory_management15.0.3.8
oracle:retail_store_inventory_management16.0.3.7
oracle:sd-wan_edge9.0
oracle:sd-wan_edge9.1

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-wph7-x527-w3h5Mavenorg.apache.tomcat:tomcat>=10.1.0-M1 <10.1.0-M610.1.0-M6
GHSA-wph7-x527-w3h5Mavenorg.apache.tomcat:tomcat>=10.0.0-M1 <10.0.1210.0.12
GHSA-wph7-x527-w3h5Mavenorg.apache.tomcat:tomcat>=9.0.40 <9.0.549.0.54
GHSA-wph7-x527-w3h5Mavenorg.apache.tomcat:tomcat>=8.5.60 <8.5.728.5.72

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11tomcat99.0.43-2~deb11u3DSA-5009-1
Debian12, 13, 14tomcat99.0.54-1DEBIAN-CVE-2021-42340
Red Hatenterprise_linux:9::appstreampki-servlet-engine, pki-servlet-4.0-api1:9.0.50-1.el9RHBA-2022:8077
Red Hatjboss_enterprise_web_server:5.6::el7jws5-tomcat, jws5-tomcat-lib, jws5-tomcat-javadoc and 9 more0:9.0.50-3.redhat_00004.1.el7jwsRHSA-2021:4861
Red Hatjboss_enterprise_web_server:5.6::el7jws5-tomcat-native, jws5-tomcat-native-debuginfo0:1.2.30-3.redhat_3.el7jwsRHSA-2021:4861
Red Hatjboss_enterprise_web_server:5.6::el7jws5-tomcat-vault, jws5-tomcat-vault-javadoc0:1.1.8-4.Final_redhat_00004.1.el7jwsRHSA-2021:4861
Red Hatjboss_enterprise_web_server:5.6::el8jws5-tomcat, jws5-tomcat-lib, jws5-tomcat-javadoc and 7 more0:9.0.50-3.redhat_00004.1.el8jwsRHSA-2021:4861
Red Hatjboss_enterprise_web_server:5.6::el8jws5-tomcat-native, jws5-tomcat-native-debuginfo0:1.2.30-3.redhat_3.el8jwsRHSA-2021:4861
Red Hatjboss_enterprise_web_server:5.6::el8jws5-tomcat-vault, jws5-tomcat-vault-javadoc0:1.1.8-4.Final_redhat_00004.1.el8jwsRHSA-2021:4861

From the distributions' data via OSV.dev: the Debian Security Tracker; Red Hat Security Data © Red Hat, Inc., CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Red Hat.

Red Hat

Red Hat rates this Important.

Red Hat's statement

Within Red Hat OpenStack Platform, Tomcat is provided as a component of OpenDaylight. This flaw will not receive a fix as OpenDaylight was deprecated as of OpenStack Platform 14 and is only receiving security fixes for Critical flaws.

Red Hat Satellite does not include the affected Apache Tomcat, however, Tomcat is shipped with Red Hat Enterprise Linux and consumed by the Candlepin component of Satellite. Red Hat Satellite users are therefore advised to check the impact state of Red Hat Enterprise Linux, since any necessary fixes will be distributed through the platform.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 9pki-servlet-engine-1:9.0.50-1.el9Fixed 2022-11-15RHBA-2022:8077
Red Hat Fuse 7.11tomcatFixed 2022-07-07RHSA-2022:5532
Red Hat JBoss Web Server 5tomcatFixed 2021-11-30RHSA-2021:4863
Red Hat JBoss Web Server 5.6 on RHEL 7jws5-tomcat-0:9.0.50-3.redhat_00004.1.el7jwsFixed 2021-11-30RHSA-2021:4861
Red Hat JBoss Web Server 5.6 on RHEL 7jws5-tomcat-native-0:1.2.30-3.redhat_3.el7jwsFixed 2021-11-30RHSA-2021:4861
Red Hat JBoss Web Server 5.6 on RHEL 7jws5-tomcat-vault-0:1.1.8-4.Final_redhat_00004.1.el7jwsFixed 2021-11-30RHSA-2021:4861
Red Hat JBoss Web Server 5.6 on RHEL 8jws5-tomcat-0:9.0.50-3.redhat_00004.1.el8jwsFixed 2021-11-30RHSA-2021:4861
Red Hat JBoss Web Server 5.6 on RHEL 8jws5-tomcat-native-0:1.2.30-3.redhat_3.el8jwsFixed 2021-11-30RHSA-2021:4861
Red Hat JBoss Web Server 5.6 on RHEL 8jws5-tomcat-vault-0:1.1.8-4.Final_redhat_00004.1.el8jwsFixed 2021-11-30RHSA-2021:4861
Red Hat Support for Spring Boot 2.5.10tomcatFixed 2022-04-12RHSA-2022:1179
Red Hat Decision Manager 7tomcatNot affected
Red Hat Enterprise Linux 6tomcat6Not affected
Red Hat Enterprise Linux 7tomcatNot affected
Red Hat Enterprise Linux 8pki-deps:10.6/pki-servlet-engineNot affected
Red Hat JBoss Data Grid 6jbosswebNot affected
Red Hat JBoss Data Virtualization 6jbosswebNot affected
Red Hat JBoss Enterprise Application Platform 6jbosswebNot affected
Red Hat JBoss Fuse 6tomcatOut of support scope
Red Hat JBoss Web Server 3tomcatNot affected
Red Hat OpenStack Platform 10 (Newton)opendaylightOut of support scope
2 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-42340.

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON