CVE Vulnerabilities

CVE-2022-25762

Improper Resource Shutdown or Release

Published: May 13, 2022 | Modified: Feb 23, 2023
CVSS 3.x
8.6
HIGH
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L
CVSS 2.x
7.5 HIGH
AV:N/AC:L/Au:N/C:P/I:P/A:P
RedHat/V2
RedHat/V3
8.6 IMPORTANT
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L
Ubuntu
MEDIUM

If a web application sends a WebSocket message concurrently with the WebSocket connection closing when running on Apache Tomcat 8.5.0 to 8.5.75 or Apache Tomcat 9.0.0.M1 to 9.0.20, it is possible that the application will continue to use the socket after it has been closed. The error handling triggered in this case could cause the a pooled object to be placed in the pool twice. This could result in subsequent connections using the same object concurrently which could result in data being returned to the wrong use and/or other errors.

Weakness

The product does not release or incorrectly releases a resource before it is made available for re-use.

Affected Software

Name Vendor Start Version End Version
Tomcat Apache 8.5.0 (including) 8.5.76 (excluding)
Tomcat Apache 9.0.0 (including) 9.0.21 (excluding)
Red Hat Enterprise Linux 8 RedHat pki-core:10.6-8030020200911215836.5ff1562f *
Red Hat Enterprise Linux 8 RedHat pki-deps:10.6-8030020200527165326.30b713e6 *
Tomcat8 Ubuntu bionic *
Tomcat9 Ubuntu bionic *
Tomcat9 Ubuntu upstream *

Potential Mitigations

  • Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
  • For example, languages such as Java, Ruby, and Lisp perform automatic garbage collection that releases memory for objects that have been deallocated.

References