CVE-2021-42340
tomcat: OutOfMemoryError caused by HTTP upgrade connection leak could lead to DoS
Overview
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.
Source: OX vulnerability database
Severity
7.5 · HIGH
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness: CWE-772
Affected packages · 2
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| Bitnami | tomcat | >=8.5.60, <8.5.72>=9.0.40, <9.0.54>=10.0.1, <10.0.12 | 8.5.729.0.5410.0.12 |
| Maven | org.apache.tomcat: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 | 10.1.0-M610.0.129.0.548.5.72 |
Open a package to see all its vulnerabilities.
Operating systems · 15 fixes
Photon OS 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 4.0 | apache-tomcat +1 | 8.5.72-1.ph4 |
Red Hat 3 releases · 5 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 7 | opendaylight | eol | — |
| 7 | jws5-tomcat-vault +1 | 0:1.1.8-4.Final_redhat_00004.1.el7jws | RHSA-2021:4861 |
| 7 | jws5-tomcat-native | 0:1.2.30-3.redhat_3.el7jws | RHSA-2021:4861 |
| 7 | jws5-tomcat +11 | 0:9.0.50-3.redhat_00004.1.el7jws | RHSA-2021:4861 |
| 8 | jws5-tomcat-vault +1 | 0:1.1.8-4.Final_redhat_00004.1.el8jws | RHSA-2021:4861 |
| 8 | jws5-tomcat-native | 0:1.2.30-3.redhat_3.el8jws | RHSA-2021:4861 |
3 more rows
debian 4 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 11 | tomcat9 | 9.0.43-2~deb11u3 |
| 12 | tomcat9 | 9.0.54-1 |
| 13 | tomcat9 | 9.0.54-1 |
| 14 | tomcat9 | 9.0.54-1 |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| tomcat9 | 9.0.54-1 |
References
- tomcat.apache.org http://tomcat.apache.org/security-10.html#Fixed_in_Apache_Tomcat_10.0.12
- tomcat.apache.org http://tomcat.apache.org/security-10.html#Fixed_in_Apache_Tomcat_10.1.0-M6
- tomcat.apache.org http://tomcat.apache.org/security-8.html#Fixed_in_Apache_Tomcat_8.5.72
- tomcat.apache.org http://tomcat.apache.org/security-9.html#Fixed_in_Apache_Tomcat_9.0.54
- access.redhat.com https://access.redhat.com/security/cve/CVE-2021-42340
- github.com https://github.com/apache/tomcat
- github.com https://github.com/apache/tomcat/commit/31d62426645824bdfe076a0c0eafa904d90b4fb9
- github.com https://github.com/apache/tomcat/commit/80f1438ec45e77a07b96419808971838d259eb47
- github.com https://github.com/apache/tomcat/commit/d27535bdee95d252418201eb21e9d29476aa6b6a
- github.com https://github.com/apache/tomcat/commit/d5a6660cba7f51589468937bf3bbad4db7810371
Show all 26 references
- kc.mcafee.com https://kc.mcafee.com/corporate/index?page=content&id=SB10379
- lists.apache.org https://lists.apache.org/thread.html/r8097a2d1550aa78e585fc77e602b9046e6d4099d8d132497c5387784%40%3Ccommits.myfaces.apache.org%3E
- lists.apache.org https://lists.apache.org/thread.html/r8097a2d1550aa78e585fc77e602b9046e6d4099d8d132497c5387784@%3Ccommits.myfaces.apache.org%3E
- lists.apache.org https://lists.apache.org/thread.html/r83a35be60f06aca2065f188ee542b9099695d57ced2e70e0885f905c%40%3Cannounce.tomcat.apache.org%3E
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2021-42340
- security.gentoo.org https://security.gentoo.org/glsa/202208-34
- security.netapp.com https://security.netapp.com/advisory/ntap-20211104-0001
- security.netapp.com https://security.netapp.com/advisory/ntap-20211104-0001/
- tomcat.apache.org https://tomcat.apache.org/security-10.html
- tomcat.apache.org https://tomcat.apache.org/security-8.html
- tomcat.apache.org https://tomcat.apache.org/security-9.html
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2021-42340
- www.debian.org https://www.debian.org/security/2021/dsa-5009
- www.oracle.com https://www.oracle.com/security-alerts/cpuapr2022.html
- www.oracle.com https://www.oracle.com/security-alerts/cpujan2022.html
- www.oracle.com https://www.oracle.com/security-alerts/cpujul2022.html
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.