CVEBrief

Home / Apache Software Foundation / Apache Tomcat / CVE-2021-42340

CVE-2021-42340: is it exploited, and which versions of Apache Software Foundation Apache Tomcat are affected and fixed?

CVE-2021-42340 is a resource not released after use vulnerability in Apache Software Foundation Apache Tomcat. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 14:08 UTC). Affected: org.apache.tomcat:tomcat from 10.1.0-M1 before 10.1.0-M6, org.apache.tomcat:tomcat from 10.0.0-M1 before 10.0.12, org.apache.tomcat:tomcat from 9.0.40 before 9.0.54 and 1 more (GitHub advisory GHSA-wph7-x527-w3h5). Fixed in 10.1.0-M6, 10.0.12, 9.0.54 and 8.5.72 (GitHub advisory GHSA-wph7-x527-w3h5). Severity: High (7.5, CVSS 3.1, from NVD).

Data checked December 3, 2026: last read CISA KEV December 3, 2026, 14:08 UTC, CVE record November 19, 2026, 07:15 UTC and NVD November 19, 2026, 07:54 UTC.

Exploited in the wild
Not in CISA KEV
KEV read December 3, 2026, 14:08 UTC
Affected
org.apache.tomcat:tomcat from 10.1.0-M1 before 10.1.0-M6, org.apache.tomcat:tomcat from 10.0.0-M1 before 10.0.12, org.apache.tomcat:tomcat from 9.0.40 before 9.0.54 and 1 more
GitHub advisory GHSA-wph7-x527-w3h5
Fixed in
10.1.0-M6, 10.0.12, 9.0.54 and 8.5.72
GitHub advisory GHSA-wph7-x527-w3h5
Severity
High 7.5
CVSS 3.1 from NVD
Exploit odds (EPSS)
10.8% in 30 days
higher than 96% of CVEs; FIRST, December 2, 2026
Free for up to 3 items: a weekly email, and an alert the day CISA lists one as exploited. We email you once to confirm. More about the watch

What is 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.

From the CVE record by apache, last updated August 4, 2024, 03:30 UTC.

Which versions are affected, and which fix it?

VendorProductAffectedFixed or not affected from
Apache Software FoundationApache 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

As the CVE record by apache states it, last updated August 4, 2024. Version ranges are the CNA's; a version the record calls not affected is usually the fix.

Which packages are affected, and in which version is each fixed?

EcosystemPackageAffectedFixed inAdvisory
Mavenorg.apache.tomcat:tomcat>= 10.1.0-M1, < 10.1.0-M610.1.0-M6GHSA-wph7-x527-w3h5
Mavenorg.apache.tomcat:tomcat>= 10.0.0-M1, < 10.0.1210.0.12GHSA-wph7-x527-w3h5
Mavenorg.apache.tomcat:tomcat>= 9.0.40, < 9.0.549.0.54GHSA-wph7-x527-w3h5
Mavenorg.apache.tomcat:tomcat>= 8.5.60, < 8.5.728.5.72GHSA-wph7-x527-w3h5

GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated March 11, 2024. Summary: Missing Release of Resource after Effective Lifetime in Apache Tomcat.

Which products and versions does the NVD list as affected?

VendorProductVersionsType
apachetomcatfrom 8.5.60 before 8.5.72application
apachetomcatfrom 9.0.40 before 9.0.54application
apachetomcatfrom 10.0.1 before 10.0.12application
apachetomcat10.0.0application
apachetomcat10.1.0application
netapphciall versionsapplication
netappmanagement services for element softwareall versionsapplication
debiandebian linux11.0operating system
oracleagile engineering data management6.2.1.0application
oraclebig data spatial and graphbefore 23.1application
oraclecommunications diameter signaling routerfrom 8.0.0.0 through 8.5.0.2application
oraclehospitality cruise shipboard property management system20.1.0application
oraclemanaged file transfer12.2.1.3.0application
oraclemanaged file transfer12.2.1.4.0application
oraclemiddleware common libraries and tools12.2.1.4.0application
oraclepayment interface19.1application
oraclepayment interface20.3application
oracleretail customer insights15.0.2application
oracleretail customer insights16.0.2application
oracleretail data extractor for merchandising15.0.2application
oracleretail data extractor for merchandising16.0.2application
oracleretail eftlink21.0.0application
oracleretail financial integration16.0.1application
oracleretail financial integration19.0.0application
oracleretail store inventory management14.0.4.13application

NVD analysis (status Modified), last modified June 17, 2026, 04:09 UTC.

How severe is CVE-2021-42340?

ScoreVersionVectorSource
High 7.5CVSS 3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HNVD
Medium 5.0CVSS 2.0AV:N/AC:L/Au:N/C:N/I:N/A:PNVD

Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.

What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.

Is CVE-2021-42340 exploited in the wild?

CISA KEV
Not listed (catalog 2026.11.30)
EPSS
10.8% probability of exploitation activity in the next 30 days, percentile 96.0 (FIRST EPSS, scores of December 2, 2026)

What kind of flaw is it?

Where are the vendor advisories and references?

When was it published, and where is the official record?

Reserved
October 13, 2021
Published
October 14, 2021, 19:55 UTC
CVE record updated
August 4, 2024, 03:30 UTC by apache
NVD
Modified, last modified June 17, 2026, 04:09 UTC
Last checked
CVE list November 19, 2026, 07:15 UTC; NVD November 19, 2026, 07:54 UTC; KEV December 3, 2026, 14:08 UTC; EPSS December 2, 2026
Official record
cve.org · NVD

What other CVEs affect Apache Tomcat?

Every CVE in Apache Tomcat

Questions about CVE-2021-42340

Is CVE-2021-42340 exploited in the wild?

Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 14:08 UTC. FIRST's EPSS gives it a 10.8% chance of exploitation activity in the next 30 days (scores of December 2, 2026).

Which versions of Apache Software Foundation Apache Tomcat are affected by CVE-2021-42340?

org.apache.tomcat:tomcat from 10.1.0-M1 before 10.1.0-M6, org.apache.tomcat:tomcat from 10.0.0-M1 before 10.0.12, org.apache.tomcat:tomcat from 9.0.40 before 9.0.54 and org.apache.tomcat:tomcat from 8.5.60 before 8.5.72, per the GitHub advisory GHSA-wph7-x527-w3h5. The tables above give every range the sources list.

Which version fixes CVE-2021-42340?

10.1.0-M6, 10.0.12, 9.0.54 and 8.5.72, per the GitHub advisory GHSA-wph7-x527-w3h5. Check the vendor's advisory before you rely on it.

How severe is CVE-2021-42340?

High (7.5, CVSS 3.1, from NVD). The severity table above shows each score with its source.

Where is the official record of CVE-2021-42340?

The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.