CyberSecBulletin
CVE-2022-25762NVD status: Modified

Apache Tomcat: Improper Resource Shutdown or Release

CVE-2022-25762 is a high-severity improper resource shutdown or release vulnerability in Apache Tomcat from Apache, with a CVSS 3.1 base score of 8.6 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. Affected Apache Tomcat versions: Apache Tomcat 9 9.0.0.M1 to 9.0.20; Apache Tomcat 8.5 8.5.0 to 8.5.75. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 8.4% chance of exploitation within 30 days, which is in the top 4.93% of all scored CVEs.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Update Tomcat to 8.5.76 or 9.0.21, whichever matches your release line, or a later version.
  2. Read the advisory on lists.apache.org for workarounds and exact fixed builds.
  3. Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.

Affected products and versions

VendorProductAffected versionsFixed in
ApacheApache TomcatApache Tomcat 9 9.0.0.M1 to 9.0.20; Apache Tomcat 8.5 8.5.0 to 8.5.75Not stated
ApacheTomcat8.5.0 up to, but not including, 8.5.76; 9.0.0 up to, but not including, 9.0.218.5.76, 9.0.21
OracleAgile Product Lifecycle Management9.3.6Not stated

Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.

How the severity score breaks down

Attack vector
NetworkCan be exploited remotely over a network, including the internet.
Attack complexity
LowNo special conditions are needed; the attack works reliably.
Privileges required
NoneNo account or login is needed.
User interaction
NoneNo action by a victim is required.
Scope
UnchangedImpact stays within the vulnerable component.
Confidentiality
HighAll data handled by the component can be read.
Integrity
LowLimited modification of data is possible.
Availability
LowPerformance or availability is reduced.

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L. Scored by NVD.

Scoring systemScoreSeverityScored by
CVSS 3.18.6HighNVD
CVSS 2.07.5HighNVD

Official description

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.

Source: the CVE record as published by its numbering authority, via NVD and CVE.org.

The underlying weakness: Improper Resource Shutdown or Release

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

How developers prevent this class of flaw

  • 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.
  • It is good practice to be responsible for freeing all resources you allocate and to be consistent with how and where you free memory in a function. If you allocate memory that you intend to free upon completion of the function, you must be sure to free the memory at all exit points for that function including error conditions.
  • Memory should be allocated/freed using matching functions such as malloc/free, new/delete, and new[]/delete[].

More Improper Resource Shutdown or Release vulnerabilities (CWE-404)

Timeline

  1. CVE record published.
  2. CISA published its SSVC assessment (exploitation: none, automatable: yes, technical impact: partial).
  3. Record last changed materially (score, affected products, status or references).

References

Patches and release notes

Third-party and government advisories

Other vulnerabilities in Apache Tomcat

All Apache Tomcat vulnerabilities

Recent Improper Resource Shutdown or Release vulnerabilities

Spotted an error? Tell us.