CVE-2023-42794: Apache Tomcat Apache Tomcat Incomplete Cleanup Vulnerability Vulnerability

MODERATE
Advisory Identifier: GHSA-jm7m-8jh6-29hp
CVSS 5.9
CWE-459
Published
Advisory Summary

CVE-2023-42794 is a MODERATE (CVSS 5.9) apache tomcat incomplete cleanup vulnerability vulnerability (CWE-459: Incomplete Cleanup) affecting Apache Tomcat libraries in the Maven ecosystem. The issue involves apache tomcat incomplete cleanup vulnerability. Remediation is available by upgrading affected packages to version 9.0.81, 8.5.94.

CVE-2023-42794 at a Glance

CVE Identifier CVE-2023-42794
GHSA Identifier GHSA-jm7m-8jh6-29hp
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-459: Incomplete Cleanup
Affected Product Apache Tomcat
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 5.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2023-42794

To remediate this vulnerability, upgrade all affected Apache Tomcat dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.apache.tomcat:tomcat-coyote fixed: 9.0.81
<dependency>
    <groupId>org.apache.tomcat</groupId>
    <artifactId>tomcat-coyote</artifactId>
    <version>9.0.81</version>
</dependency>
org.apache.tomcat:tomcat-coyote fixed: 8.5.94
<dependency>
    <groupId>org.apache.tomcat</groupId>
    <artifactId>tomcat-coyote</artifactId>
    <version>8.5.94</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.apache.tomcat

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2023-42794, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.apache.tomcat

Analyze the terminal output to locate any version of Apache Tomcat in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 9.0.81), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.apache.tomcat command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-459: Incomplete Cleanup, where the product does not properly "clean up" and remove temporary or supporting resources after they have been used. In Apache Tomcat, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Incomplete Cleanup vulnerability in Apache Tomcat. The internal fork of Commons FileUpload packaged with Apache Tomcat 9.0.70 through 9.0.80 and 8.5.85 through 8.5.93 included an unreleased, in progress refactoring that exposed a potential denial of service on Windows if a web application opened a stream for an uploaded file but failed to close the stream. The file would never be deleted from disk creating the possibility of an eventual denial of service due to the disk being full. Users are recommended to upgrade to version 9.0.81 onwards or 8.5.94 onwards, which fixes the issue.

CVE-2023-42794 Affected Apache Tomcat Versions

2 component(s)
Fixed Versions:
9.0.818.5.94
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.tomcat:tomcat-coyote
Maven
≥ 9.0.70
< 9.0.81
9.0.81
org.apache.tomcat:tomcat-coyote
Maven
≥ 8.5.85
< 8.5.94
8.5.94

References

Frequently Asked Questions

What is CVE-2023-42794?
CVE-2023-42794 is a security vulnerability in Apache Tomcat involving Apache Tomcat Incomplete Cleanup vulnerability under CWE-459: Incomplete Cleanup.
Which Apache Tomcat versions are affected?
Affected versions include releases prior to 9.0.81, 8.5.94 across affected packages: org.apache.tomcat:tomcat-coyote.
What version fixes CVE-2023-42794?
Upgrading to 9.0.81, 8.5.94 (or the latest patched release for your respective branch) resolves the vulnerability.
Is tomcat-coyote affected?
Yes, org.apache.tomcat:tomcat-coyote is affected in releases prior to 9.0.81, 8.5.94. Upgrade your dependency to 9.0.81, 8.5.94 or later.
What is the CVSS score of CVE-2023-42794?
CVE-2023-42794 has a CVSS v3.1 base score of 5.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2023-42794?
CVE-2023-42794 is classified under CWE-459: Incomplete Cleanup (The product does not properly "clean up" and remove temporary or supporting resources after they have been used.).
How can I check Maven dependencies for CVE-2023-42794?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.tomcat'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-jm7m-8jh6-29hp",
  "modified" : "2025-02-13T19:16:22Z",
  "published" : "2023-10-10T18:31:35Z",
  "aliases" : [ "CVE-2023-42794" ],
  "summary" : "Apache Tomcat Incomplete Cleanup vulnerability",
  "details" : "Incomplete Cleanup vulnerability in Apache Tomcat.\n\nThe internal fork of Commons FileUpload packaged with Apache Tomcat 9.0.70 through 9.0.80 and 8.5.85 through 8.5.93 included an unreleased, in progress refactoring that exposed a potential denial of service on Windows if a web application opened a stream for an uploaded file but failed to close the stream. The file would never be deleted from disk creating the possibility of an eventual denial of service due to the disk being full.\n\nUsers are recommended to upgrade to version 9.0.81 onwards or 8.5.94 onwards, which fixes the issue.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.tomcat:tomcat-coyote"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "9.0.70"
      }, {
        "fixed" : "9.0.81"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.tomcat:tomcat-coyote"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.5.85"
      }, {
        "fixed" : "8.5.94"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-42794"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/tomcat"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/vvbr2ms7lockj1hlhz5q3wmxb2mwcw82"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2023/10/10/8"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-459" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-10-10T22:30:15Z",
    "nvd_published_at" : "2023-10-10T18:15:18Z"
  }
}