# What is CVE-2021-42340?

> CVE-2021-42340 is a high-severity flaw (CVSS 7.5) in Tomcat from Apache, published on 14 October 2021. It is not on the list of flaws known to be exploited today. The latest forecast puts its chance of use in the next 30 days at 12%. If you run an affected version, plan in the vendor’s fix.

Canonical page: https://www.precursorintelligence.com/what-is/cve-2021-42340

## At a glance

- **Verdict:** Fix this soon. Not confirmed as exploited yet, but serious or likely enough that it should not wait for a quiet month.
- **Precursor Intelligence risk score:** 48 out of 100 (Medium); action: Plan remediation. Kept up to date as the evidence changes.
- **Severity:** High (CVSS 7.5 out of 10)
- **Known to be exploited:** No, not on the list of flaws known to be exploited today
- **Chance of use in the next 30 days:** 12% (latest exploit-likelihood forecast)
- **Published:** 14 October 2021
- **Record last updated:** 7 November 2023
- **Main product:** Tomcat from Apache
- **Affected products:** 18

## What is CVE-2021-42340? In plain terms

It can be attacked from anywhere on the internet without logging in, and nobody has to click anything. If it works, the attacker can take it offline.

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

### What kind of flaw is it?

- CWE-772: Missing Release of Resource after Effective Lifetime

### How an attack on it works

- Where an attacker can be: Anywhere on the internet
- How hard it is to pull off: Easy: no special conditions
- Login needed first: No login needed
- Does someone have to click: No, nobody has to do anything
- What an attacker gets: Can take it offline

Severity vector: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## Is CVE-2021-42340 being exploited? Not that we know of

It is not on the list of flaws known to be exploited today. The latest forecast puts the chance of it being used in the next 30 days at 12%. That can change at any time, which is why we keep watching.

Exploit likelihood over the last 7 days: 12%, 12%, 12%, 12%, 12%, 12%, 12%.

### Timeline

- 14 October 2021: Published
- 7 November 2023: Record last updated
- 19 November 2025: Exploit likelihood jumped
- 22 November 2025: Exploit likelihood fell

### How Precursor Intelligence ranks it

CVE-2021-42340 scores **48 out of 100 (Medium)**, with the action "Plan remediation".

Every published flaw gets a risk score from 0 to 100, kept up to date as the evidence changes. Four things go into the score, from the one that counts most to the ones that count less:

- Evidence it is being exploited: biggest factor
- How severe it is: strong factor
- How widely exposed it is: smaller factor
- Threat activity around it: smaller factor

85 and above is Critical. Anything confirmed as exploited is always marked for an emergency patch, whatever its score. When this flaw matches software you track, it lands in your list with its score and the reasons behind it.

## Who is affected by CVE-2021-42340?

The published record lists 18 products. Versions are as published: "8.5.60 to before 8.5.72" means from 8.5.60 up to, but not including, 8.5.72.

- [Tomcat](https://www.precursorintelligence.com/product/apache/tomcat) by [Apache](https://www.precursorintelligence.com/vendors/apache) (Application): 8.5.60 to before 8.5.72, 9.0.40 to before 9.0.54, 10.0.0-milestone10, 10.0.1 to before 10.0.12, 10.1.0-milestone1, 10.1.0-milestone2, 10.1.0-milestone3, 10.1.0-milestone4, 10.1.0-milestone5
- [Retail Store Inventory Management](https://www.precursorintelligence.com/product/oracle/retail_store_inventory_management) by [Oracle](https://www.precursorintelligence.com/vendors/oracle) (Application): 14.0.4.13, 14.1.3.5, 14.1.3.14, 15.0.3.3, 15.0.3.8, 16.0.3.7
- [Managed File Transfer](https://www.precursorintelligence.com/product/oracle/managed_file_transfer) by [Oracle](https://www.precursorintelligence.com/vendors/oracle) (Application): 12.2.1.3.0, 12.2.1.4.0
- [Payment Interface](https://www.precursorintelligence.com/product/oracle/payment_interface) by [Oracle](https://www.precursorintelligence.com/vendors/oracle) (Application): 19.1, 20.3
- [Retail Customer Insights](https://www.precursorintelligence.com/product/oracle/retail_customer_insights) by [Oracle](https://www.precursorintelligence.com/vendors/oracle) (Application): 15.0.2, 16.0.2
- [Retail Data Extractor for Merchandising](https://www.precursorintelligence.com/product/oracle/retail_data_extractor_for_merchandising) by [Oracle](https://www.precursorintelligence.com/vendors/oracle) (Application): 15.0.2, 16.0.2
- [Retail Financial Integration](https://www.precursorintelligence.com/product/oracle/retail_financial_integration) by [Oracle](https://www.precursorintelligence.com/vendors/oracle) (Application): 16.0.1, 19.0.0
- [SD-WAN Edge](https://www.precursorintelligence.com/product/oracle/sd-wan_edge) by [Oracle](https://www.precursorintelligence.com/vendors/oracle) (Application): 9.0, 9.1
- [Agile Engineering Data Management](https://www.precursorintelligence.com/product/oracle/agile_engineering_data_management) by [Oracle](https://www.precursorintelligence.com/vendors/oracle) (Application): 6.2.1.0
- [Big Data Spatial and Graph](https://www.precursorintelligence.com/product/oracle/big_data_spatial_and_graph) by [Oracle](https://www.precursorintelligence.com/vendors/oracle) (Application): before 23.1
- [Communications Diameter Signaling Router](https://www.precursorintelligence.com/product/oracle/communications_diameter_signaling_router) by [Oracle](https://www.precursorintelligence.com/vendors/oracle) (Application): 8.0.0.0 to 8.5.0.2
- [Debian Linux](https://www.precursorintelligence.com/product/debian/debian_linux) by [Debian](https://www.precursorintelligence.com/vendors/debian) (Operating system): 11.0
- [Hci](https://www.precursorintelligence.com/product/netapp/hci) by [Netapp](https://www.precursorintelligence.com/vendors/netapp) (Application): version not specified
- [Hospitality Cruise Shipboard Property Management System](https://www.precursorintelligence.com/product/oracle/hospitality_cruise_shipboard_property_management_system) by [Oracle](https://www.precursorintelligence.com/vendors/oracle) (Application): 20.1.0
- [Management Services for Element Software](https://www.precursorintelligence.com/product/netapp/management_services_for_element_software) by [Netapp](https://www.precursorintelligence.com/vendors/netapp) (Application): version not specified
- [Middleware Common Libraries and Tools](https://www.precursorintelligence.com/product/oracle/middleware_common_libraries_and_tools) by [Oracle](https://www.precursorintelligence.com/vendors/oracle) (Application): 12.2.1.4.0
- [Retail Eftlink](https://www.precursorintelligence.com/product/oracle/retail_eftlink) by [Oracle](https://www.precursorintelligence.com/vendors/oracle) (Application): 21.0.0
- [Taleo Platform](https://www.precursorintelligence.com/product/oracle/taleo_platform) by [Oracle](https://www.precursorintelligence.com/vendors/oracle) (Application): all versions

## How do I fix CVE-2021-42340?

1. **Check whether you run it.** Compare your versions with the affected products above. Not sure what you run? Precursor Intelligence can work it out from your public website, or you can pick it from a list.
2. **Apply the vendor’s fix.** Install the update named in the vendor’s advisory. We’ve put the advisories and patch notes first in the list.
3. **If you can’t patch today.** Follow any mitigation the vendor publishes, and limit who can reach the affected system from the internet until the update is in.
4. **Keep an eye on it.** Track the product and we tell you as soon as we spot this flaw on the list of exploited flaws, or a jump in its exploit likelihood.

### References

- [oracle.com](https://www.oracle.com/security-alerts/cpuapr2022.html) (Patch, Third-party advisory)
- [oracle.com](https://www.oracle.com/security-alerts/cpujan2022.html) (Patch, Third-party advisory)
- [oracle.com](https://www.oracle.com/security-alerts/cpujul2022.html) (Patch, Third-party advisory)
- [lists.apache.org](https://lists.apache.org/thread.html/r83a35be60f06aca2065f188ee542b9099695d57ced2e70e0885f905c%40%3Cannounce.tomcat.apache.org%3E) (Mailing list, Vendor advisory)
- [kc.mcafee.com](https://kc.mcafee.com/corporate/index?page=content&id=SB10379) (Third-party advisory)
- [lists.apache.org](https://lists.apache.org/thread.html/r8097a2d1550aa78e585fc77e602b9046e6d4099d8d132497c5387784%40%3Ccommits.myfaces.apache.org%3E)
- [security.gentoo.org](https://security.gentoo.org/glsa/202208-34) (Third-party advisory)
- [security.netapp.com](https://security.netapp.com/advisory/ntap-20211104-0001/) (Third-party advisory)
- [debian.org](https://www.debian.org/security/2021/dsa-5009) (Third-party advisory)

## Questions

### What is CVE-2021-42340?

CVE-2021-42340 is a high-severity flaw in Tomcat from Apache, published on 14 October 2021. It can be attacked from anywhere on the internet without logging in, and nobody has to click anything. If it works, the attacker can take it offline.

### How serious is CVE-2021-42340?

It scores 7.5 out of 10 on the CVSS severity scale, which is high. Our risk score for CVE-2021-42340 is 48 out of 100, which is Medium. Its action is "Plan remediation". Not confirmed as exploited yet, but serious or likely enough that it should not wait for a quiet month.

### Is CVE-2021-42340 being exploited?

It is not on the list of flaws known to be exploited today. The latest forecast puts the chance of it being used in the next 30 days at 12%. That can change at any time, which is why we keep watching.

### Which versions does CVE-2021-42340 affect?

For Tomcat from Apache: 8.5.60 to before 8.5.72, 9.0.40 to before 9.0.54, 10.0.0-milestone10, 10.0.1 to before 10.0.12, 10.1.0-milestone1, 10.1.0-milestone2 and 3 more. The record lists 18 products in all, each with its versions, under "Who is affected" on this page.

### How do I fix CVE-2021-42340?

Install the update the vendor names in its advisory, linked first under "How do I fix" on this page. If you can't patch today, follow the vendor's mitigation and limit who can reach the affected system from the internet.

## Does CVE-2021-42340 affect you?

Precursor Intelligence keeps checking for you:

- **Tell us what you run.** Pick your software from a list, or let us work it out from your website.
- **We match it to every flaw.** Over 400,000 published flaws, checked against your list.
- **Ranked by real-world risk.** Every flaw gets a 0 to 100 risk score, kept up to date, led by evidence criminals are using it.
- **Told as soon as we know.** An alert by email, in the app or by webhook to your own tools.

Start free (no card, nothing to install): https://www.precursorintelligence.com/register
Book a demo: https://www.precursorintelligence.com/contact

