CVE-2024-56337: CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition in Apache Software Foundation Apache Tomcat
Time-of-check Time-of-use (TOCTOU) Race Condition vulnerability in Apache Tomcat. This 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. The following versions were EOL at the time the CVE was created but are known to be affected: 8.5.0 though 8.5.100. Other, older, EOL versions may also be affected. The mitigation for CVE-2024-50379 was incomplete. Users running Tomcat on a case insensitive file system with the default servlet write enabled (readonly initialisation parameter 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: - running on Java 8 or Java 11: the system property sun.io.useCanonCaches must be explicitly set to false (it defaults to true) - running on Java 17: the system property sun.io.useCanonCaches, if set, must be set to false (it defaults to false) - running on Java 21 onwards: no further configuration is required (the system property and the problematic cache have been removed) Tomcat 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.
AI Analysis
Technical Summary
CVE-2024-56337 is a critical vulnerability classified as a Time-of-check Time-of-use (TOCTOU) race condition in the Apache Tomcat server, a widely used Java-based web server and servlet container. This flaw affects multiple Tomcat versions: from 11.0.0-M1 through 11.0.1, 10.1.0-M1 through 10.1.33, 9.0.0.M1 through 9.0.97, and older EOL versions including 8.5.0 through 8.5.100. The vulnerability stems from the interaction between Tomcat's default servlet write capability and the behavior of the Java system property sun.io.useCanonCaches, which controls caching of canonical file paths. On case-insensitive file systems (such as Windows NTFS or macOS APFS), if the default servlet is configured with write enabled (readonly initialization parameter set to false, which is non-default), and the sun.io.useCanonCaches property is not properly set, a race condition can occur during file access checks. This TOCTOU race condition allows an attacker to exploit the timing gap between the file existence check and its subsequent use, potentially leading to unauthorized file manipulation, arbitrary code execution, or denial of service. The mitigation for a related vulnerability CVE-2024-50379 was incomplete, necessitating additional configuration. Specifically, users running Tomcat on Java 8 or Java 11 must explicitly set sun.io.useCanonCaches=false (it defaults to true), while on Java 17 it must be set to false if configured (default is false). Java 21 and later have removed this problematic cache, requiring no further action. Tomcat versions 11.0.3, 10.1.35, and 9.0.99 and later include built-in checks to enforce correct sun.io.useCanonCaches settings and will set it to false by default where possible. The CVSS v3.1 score is 9.8 (critical), reflecting the vulnerability's network attack vector, no required privileges or user interaction, and high impact on confidentiality, integrity, and availability. No known exploits are currently reported in the wild, but the severity and ease of exploitation warrant urgent attention.
Potential Impact
For European organizations, the impact of CVE-2024-56337 is significant due to the widespread use of Apache Tomcat in enterprise web applications, government portals, and critical infrastructure services. Exploitation could allow attackers to bypass file access controls, modify or replace files, execute arbitrary code, or cause service outages, leading to data breaches, service disruption, and loss of trust. Organizations running Tomcat on Windows or macOS servers are particularly vulnerable due to the case-insensitive file system requirement. The vulnerability affects confidentiality (unauthorized data access), integrity (file tampering), and availability (denial of service). Given the criticality and network exposure, attackers could remotely exploit this flaw without authentication or user interaction, increasing the risk of widespread compromise. This threat is especially concerning for sectors such as finance, healthcare, government, and telecommunications, where Tomcat-based applications are common and data sensitivity is high. Failure to mitigate promptly could result in regulatory penalties under GDPR due to data breaches.
Mitigation Recommendations
European organizations should take the following specific steps to mitigate CVE-2024-56337: 1) Immediately identify all Apache Tomcat instances running versions affected by this vulnerability, including EOL versions still in use. 2) Upgrade Tomcat to versions 9.0.99, 10.1.35, or 11.0.3 or later, which include built-in mitigations and enforce correct configuration. 3) For environments where upgrading is not immediately feasible, explicitly set the Java system property sun.io.useCanonCaches=false on Java 8 and Java 11 to disable the problematic canonical path caching. 4) Verify that the default servlet's readonly initialization parameter is set to true (write disabled) unless write access is strictly required and properly secured. 5) Prefer running Tomcat on case-sensitive file systems (e.g., Linux ext4) to avoid the underlying race condition scenario. 6) Conduct thorough testing of web applications after configuration changes to ensure no functionality is broken. 7) Monitor logs and network traffic for suspicious activity indicative of exploitation attempts. 8) Implement strict access controls and network segmentation to limit exposure of Tomcat servers. 9) Maintain an inventory of Java runtime versions in use and plan upgrades to Java 21 or later, where this issue is resolved at the JVM level. 10) Educate DevOps and security teams about this vulnerability and ensure patch management processes prioritize this critical issue.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Spain, Sweden, Belgium, Poland, Finland
CVE-2024-56337: CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition in Apache Software Foundation Apache Tomcat
Description
Time-of-check Time-of-use (TOCTOU) Race Condition vulnerability in Apache Tomcat. This 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. The following versions were EOL at the time the CVE was created but are known to be affected: 8.5.0 though 8.5.100. Other, older, EOL versions may also be affected. The mitigation for CVE-2024-50379 was incomplete. Users running Tomcat on a case insensitive file system with the default servlet write enabled (readonly initialisation parameter 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: - running on Java 8 or Java 11: the system property sun.io.useCanonCaches must be explicitly set to false (it defaults to true) - running on Java 17: the system property sun.io.useCanonCaches, if set, must be set to false (it defaults to false) - running on Java 21 onwards: no further configuration is required (the system property and the problematic cache have been removed) Tomcat 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.
AI-Powered Analysis
Technical Analysis
CVE-2024-56337 is a critical vulnerability classified as a Time-of-check Time-of-use (TOCTOU) race condition in the Apache Tomcat server, a widely used Java-based web server and servlet container. This flaw affects multiple Tomcat versions: from 11.0.0-M1 through 11.0.1, 10.1.0-M1 through 10.1.33, 9.0.0.M1 through 9.0.97, and older EOL versions including 8.5.0 through 8.5.100. The vulnerability stems from the interaction between Tomcat's default servlet write capability and the behavior of the Java system property sun.io.useCanonCaches, which controls caching of canonical file paths. On case-insensitive file systems (such as Windows NTFS or macOS APFS), if the default servlet is configured with write enabled (readonly initialization parameter set to false, which is non-default), and the sun.io.useCanonCaches property is not properly set, a race condition can occur during file access checks. This TOCTOU race condition allows an attacker to exploit the timing gap between the file existence check and its subsequent use, potentially leading to unauthorized file manipulation, arbitrary code execution, or denial of service. The mitigation for a related vulnerability CVE-2024-50379 was incomplete, necessitating additional configuration. Specifically, users running Tomcat on Java 8 or Java 11 must explicitly set sun.io.useCanonCaches=false (it defaults to true), while on Java 17 it must be set to false if configured (default is false). Java 21 and later have removed this problematic cache, requiring no further action. Tomcat versions 11.0.3, 10.1.35, and 9.0.99 and later include built-in checks to enforce correct sun.io.useCanonCaches settings and will set it to false by default where possible. The CVSS v3.1 score is 9.8 (critical), reflecting the vulnerability's network attack vector, no required privileges or user interaction, and high impact on confidentiality, integrity, and availability. No known exploits are currently reported in the wild, but the severity and ease of exploitation warrant urgent attention.
Potential Impact
For European organizations, the impact of CVE-2024-56337 is significant due to the widespread use of Apache Tomcat in enterprise web applications, government portals, and critical infrastructure services. Exploitation could allow attackers to bypass file access controls, modify or replace files, execute arbitrary code, or cause service outages, leading to data breaches, service disruption, and loss of trust. Organizations running Tomcat on Windows or macOS servers are particularly vulnerable due to the case-insensitive file system requirement. The vulnerability affects confidentiality (unauthorized data access), integrity (file tampering), and availability (denial of service). Given the criticality and network exposure, attackers could remotely exploit this flaw without authentication or user interaction, increasing the risk of widespread compromise. This threat is especially concerning for sectors such as finance, healthcare, government, and telecommunications, where Tomcat-based applications are common and data sensitivity is high. Failure to mitigate promptly could result in regulatory penalties under GDPR due to data breaches.
Mitigation Recommendations
European organizations should take the following specific steps to mitigate CVE-2024-56337: 1) Immediately identify all Apache Tomcat instances running versions affected by this vulnerability, including EOL versions still in use. 2) Upgrade Tomcat to versions 9.0.99, 10.1.35, or 11.0.3 or later, which include built-in mitigations and enforce correct configuration. 3) For environments where upgrading is not immediately feasible, explicitly set the Java system property sun.io.useCanonCaches=false on Java 8 and Java 11 to disable the problematic canonical path caching. 4) Verify that the default servlet's readonly initialization parameter is set to true (write disabled) unless write access is strictly required and properly secured. 5) Prefer running Tomcat on case-sensitive file systems (e.g., Linux ext4) to avoid the underlying race condition scenario. 6) Conduct thorough testing of web applications after configuration changes to ensure no functionality is broken. 7) Monitor logs and network traffic for suspicious activity indicative of exploitation attempts. 8) Implement strict access controls and network segmentation to limit exposure of Tomcat servers. 9) Maintain an inventory of Java runtime versions in use and plan upgrades to Java 21 or later, where this issue is resolved at the JVM level. 10) Educate DevOps and security teams about this vulnerability and ensure patch management processes prioritize this critical issue.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- apache
- Date Reserved
- 2024-12-20T11:16:29.949Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 690204553aaa02566521b568
Added to database: 10/29/2025, 12:11:01 PM
Last enriched: 10/29/2025, 12:20:21 PM
Last updated: 10/30/2025, 3:20:28 PM
Views: 7
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2025-43939: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection' in Dell Unity
HighCVE-2025-5347: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Zohocorp ManageEngine Exchange Reporter Plus
MediumCVE-2025-5343: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Zohocorp ManageEngine Exchange Reporter Plus
MediumCVE-2025-43942: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in Dell Unity
HighCVE-2025-5342: CWE-400 Uncontrolled Resource Consumption in Zohocorp ManageEngine Exchange Reporter Plus
MediumActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.