cbcvebase.
CVE-2024-56337
published 2024-12-20

CVE-2024-56337: 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…

PriorityP265critical9.8CVSS 3.1
AVNACLPRNUINSUCHIHAH
EPSS
9.03%
94.7th percentile
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.

Affected

6 ranges
VendorProductVersion rangeFixed in
apachetomcat
apachetomcat>= 10.1.0 < 10.1.3410.1.34
apachetomcat>= 11.0.0 < 11.0.211.0.2
apachetomcat>= 9.0.0 < 9.0.989.0.98
debiantomcat10< tomcat10 10.1.34-0+deb12u1 (bookworm)tomcat10 10.1.34-0+deb12u1 (bookworm)
debiantomcat9< tomcat10 10.1.34-0+deb12u1 (bookworm)tomcat10 10.1.34-0+deb12u1 (bookworm)

Detection & IOCsextracted from sources · hover to see the quote

  • Exploitation requires the default servlet write enabled: 'readonly' initialization parameter set to the non-default value of false on a case-insensitive file system (e.g., Windows or macOS)
  • The attack vector is a TOCTOU race condition during JSP compilation — an uploaded file is treated as a JSP and executed, resulting in RCE. Detect unexpected JSP file creation/execution in writable servlet directories.
  • Check for the system property sun.io.useCanonCaches being set to true (or not explicitly set to false) on Java 8 or Java 11 Tomcat deployments — this is the enabling condition for exploitation.
  • Tomcat versions 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 8.5.0 through 8.5.100 are vulnerable. Flag these versions in asset inventory.
  • CVE-2024-56337 is an incomplete fix for CVE-2024-50379 — detections or patches targeting only CVE-2024-50379 (Tomcat 11.0.2, 10.1.34, 9.0.98) are insufficient for Java 8/11 environments without the sun.io.useCanonCaches=false property.
  • ·Exploitation is only possible on case-insensitive file systems (e.g., Windows, macOS) — Linux/RHEL case-sensitive deployments are not vulnerable under normal conditions.
  • ·The default servlet write must be explicitly enabled (readonly=false) — this is non-default and not common in production environments, significantly limiting the attack surface.
  • ·Java 21+ deployments require no additional configuration changes — the problematic sun.io.useCanonCaches property and cache have been removed entirely.
  • ·Future Tomcat versions 11.0.3, 10.1.35, and 9.0.99 will enforce the safe sun.io.useCanonCaches configuration automatically before allowing default servlet write on case-insensitive file systems.

CVSS provenance

nvdv3.19.8CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
ghsa9.8CRITICAL
osv9.8CRITICAL
vendor_apache9.8HIGH
vendor_debian9.8CRITICAL
vendor_oracle9.8CRITICAL
vendor_redhat9.8CRITICAL
Stop checking back — get the weekly exploitation signal.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.