CVE-2024-56337: Apache Tomcat Apache Tomcat Time-of-check Time-of-use (TOCTOU) Vulnerability
HIGHCVE-2024-56337 is a HIGH apache tomcat time-of-check time-of-use (toctou) vulnerability (CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition) affecting Apache Tomcat libraries in the Maven ecosystem. The issue involves apache tomcat time-of-check time-of-use (toctou) race condition vulnerability. Remediation is available by upgrading affected packages to version 11.0.2, 10.1.34, 9.0.98.
CVE-2024-56337 at a Glance
How to Fix CVE-2024-56337
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.
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-catalina</artifactId>
<version>11.0.2</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-catalina</artifactId>
<version>10.1.34</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-embed-core</artifactId>
<version>9.0.98</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<version>11.0.2</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<version>10.1.34</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<version>9.0.98</version>
</dependency>
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-2024-56337, 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 11.0.2), 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-367: Time-of-check Time-of-use (TOCTOU) Race Condition, where the product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check. 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
CVE-2024-56337 Affected Apache Tomcat Versions
6 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.tomcat:tomcat-catalina
|
Maven |
≥ 11.0.0-M1
< 11.0.2
|
11.0.2
|
|
org.apache.tomcat:tomcat-catalina
|
Maven |
≥ 10.1.0-M1
< 10.1.34
|
10.1.34
|
|
org.apache.tomcat:tomcat-embed-core
|
Maven |
≥ 9.0.0.M1
< 9.0.98
|
9.0.98
|
|
org.apache.tomcat.embed:tomcat-embed-core
|
Maven |
≥ 11.0.0-M1
< 11.0.2
|
11.0.2
|
|
org.apache.tomcat.embed:tomcat-embed-core
|
Maven |
≥ 10.1.0-M1
< 10.1.34
|
10.1.34
|
|
org.apache.tomcat.embed:tomcat-embed-core
|
Maven |
≥ 9.0.0.M1
< 9.0.98
|
9.0.98
|
References
Frequently Asked Questions
What is CVE-2024-56337?
Which Apache Tomcat versions are affected?
What version fixes CVE-2024-56337?
Is tomcat-catalina affected?
Is tomcat-embed-core affected?
What CWE is associated with CVE-2024-56337?
How can I check Maven dependencies for CVE-2024-56337?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-27hp-xhwr-wr2m",
"modified" : "2025-11-03T22:52:07Z",
"published" : "2024-12-20T18:31:32Z",
"aliases" : [ "CVE-2024-56337" ],
"summary" : "Apache Tomcat Time-of-check Time-of-use (TOCTOU) Race Condition vulnerability",
"details" : "Time-of-check Time-of-use (TOCTOU) Race Condition vulnerability in Apache Tomcat.\n\nThis issue affects Apache Tomcat: from 11.0.0-M1 through 11.0.1, from 10.1.0-M1 through 10.1.33, from 9.0.0.M1 through 9.0.97.\n\nThe mitigation for CVE-2024-50379 was incomplete.\n\nUsers running Tomcat on a case insensitive file system with the default servlet write enabled (readonly initialisation \nparameter set to the non-default value of false) may need additional configuration to fully mitigate CVE-2024-50379 depending on which version of Java they are using with Tomcat:\n- running on Java 8 or Java 11: the system property sun.io.useCanonCaches must be explicitly set to false (it defaults to true)\n- running on Java 17: the system property sun.io.useCanonCaches, if set, must be set to false (it defaults to false)\n- running on Java 21 onwards: no further configuration is required (the system property and the problematic cache have been removed)\n\nTomcat 11.0.3, 10.1.35 and 9.0.99 onwards will include checks that sun.io.useCanonCaches is set appropriately before allowing the default servlet to be write enabled on a case insensitive file system. Tomcat will also set sun.io.useCanonCaches to false by default where it can.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.tomcat:tomcat-catalina"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "11.0.0-M1"
}, {
"fixed" : "11.0.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.tomcat:tomcat-catalina"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "10.1.0-M1"
}, {
"fixed" : "10.1.34"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.tomcat:tomcat-embed-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "9.0.0.M1"
}, {
"fixed" : "9.0.98"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.tomcat.embed:tomcat-embed-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "11.0.0-M1"
}, {
"fixed" : "11.0.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.tomcat.embed:tomcat-embed-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "10.1.0-M1"
}, {
"fixed" : "10.1.34"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.tomcat.embed:tomcat-embed-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "9.0.0.M1"
}, {
"fixed" : "9.0.98"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-56337"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apache/tomcat"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread/b2b9qrgjrz1kvo4ym8y2wkfdvwoq6qbp"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2025/01/msg00009.html"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20250103-0002"
}, {
"type" : "WEB",
"url" : "https://tomcat.apache.org/security-10.html#Fixed_in_Apache_Tomcat_10.1.34"
}, {
"type" : "WEB",
"url" : "https://tomcat.apache.org/security-11.html#Fixed_in_Apache_Tomcat_11.0.2"
}, {
"type" : "WEB",
"url" : "https://tomcat.apache.org/security-9.html#Fixed_in_Apache_Tomcat_9.0.98"
}, {
"type" : "WEB",
"url" : "https://www.cve.org/CVERecord?id=CVE-2024-50379"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-367" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-12-20T19:50:45Z",
"nvd_published_at" : "2024-12-20T16:15:24Z"
}
}