{"id":"CVE-2021-42340","details":"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.","aliases":["BIT-tomcat-2021-42340","GHSA-wph7-x527-w3h5"],"modified":"2026-02-11T14:34:20.935376Z","published":"2021-10-14T20:15:09.060Z","related":["MGASA-2021-0485"],"references":[{"type":"WEB","url":"https://lists.apache.org/thread.html/r8097a2d1550aa78e585fc77e602b9046e6d4099d8d132497c5387784%40%3Ccommits.myfaces.apache.org%3E"},{"type":"ADVISORY","url":"https://kc.mcafee.com/corporate/index?page=content&id=SB10379"},{"type":"ADVISORY","url":"https://lists.apache.org/thread.html/r83a35be60f06aca2065f188ee542b9099695d57ced2e70e0885f905c%40%3Cannounce.tomcat.apache.org%3E"},{"type":"ADVISORY","url":"https://security.gentoo.org/glsa/202208-34"},{"type":"ADVISORY","url":"https://security.netapp.com/advisory/ntap-20211104-0001/"},{"type":"ADVISORY","url":"https://www.debian.org/security/2021/dsa-5009"},{"type":"ADVISORY","url":"https://www.oracle.com/security-alerts/cpuapr2022.html"},{"type":"ADVISORY","url":"https://www.oracle.com/security-alerts/cpujan2022.html"},{"type":"ADVISORY","url":"https://www.oracle.com/security-alerts/cpujul2022.html"},{"type":"FIX","url":"https://www.oracle.com/security-alerts/cpuapr2022.html"},{"type":"FIX","url":"https://www.oracle.com/security-alerts/cpujan2022.html"},{"type":"FIX","url":"https://www.oracle.com/security-alerts/cpujul2022.html"},{"type":"ARTICLE","url":"https://lists.apache.org/thread.html/r83a35be60f06aca2065f188ee542b9099695d57ced2e70e0885f905c%40%3Cannounce.tomcat.apache.org%3E"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/apache/tomcat","events":[{"introduced":"04d663d7541a013098db3a3f81b1c23c255c12a4"},{"fixed":"53c394049af76032bc7acab9de023013ad4fdc43"},{"introduced":"11cce490eb67a8aca64377a22c0cea2e38896725"},{"fixed":"454f804f3336ec980e84eb84bb6a051e349c6d3a"},{"introduced":"e4344b6bd67359e1690312674d83710a793f1d5b"},{"fixed":"84e18583f461778707f7fd2e25b1f0677e44e899"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2021-42340.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}]}