cbcvebase.
CVE-2024-50379
published 2024-12-17

CVE-2024-50379: Time-of-check Time-of-use (TOCTOU) Race Condition vulnerability during JSP compilation in Apache Tomcat permits an RCE on case insensitive file systems when…

PriorityP277critical9.8CVSS 3.1
AVNACLPRNUINSUCHIHAH
EPSS
44.31%
98.6th percentile
Time-of-check Time-of-use (TOCTOU) Race Condition vulnerability during JSP compilation in Apache Tomcat permits an RCE on case insensitive file systems when the default servlet is enabled for write (non-default configuration). 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. Users are recommended to upgrade to version 11.0.2, 10.1.34 or 9.0.98, which fixes the issue.

Affected

10 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
apache_software_foundationapache_tomcat10.1.0-M1 – 10.1.33
apache_software_foundationapache_tomcat11.0.0-M1 – 11.0.1
apache_software_foundationapache_tomcat8.5.0 – 8.5.100
apache_software_foundationapache_tomcat9.0.0.M1 – 9.0.97
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 false (non-default). Detect by auditing Tomcat web.xml for DefaultServlet with readonly=false.
  • Attack vector: an uploaded file is treated as a JSP and executed via race condition. Monitor for unexpected JSP file creation in writable servlet directories followed by immediate HTTP GET/execution requests to those paths.
  • Exploitation requires concurrent read and upload operations on the same file. Detect anomalous simultaneous PUT and GET requests to the same resource path on Tomcat, especially for .jsp extensions.
  • CVE-2024-56337 is an incomplete fix for CVE-2024-50379 affecting Java 8/11 deployments where sun.io.useCanonCaches defaults to true. Flag Tomcat instances running Java 8 or 11 without sun.io.useCanonCaches=false as still vulnerable even after patching to 11.0.2/10.1.34/9.0.98.
  • Affected version ranges for detection/asset inventory: Apache Tomcat 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.
  • ·Vulnerability is only exploitable when the DefaultServlet readonly parameter is explicitly set to false — this is NOT the default configuration. Default deployments are not vulnerable.
  • ·Exploitation additionally requires a case-insensitive file system (e.g., Windows or macOS). Linux/RHEL case-sensitive file systems are not vulnerable.
  • ·Patching to 11.0.2/10.1.34/9.0.98 alone is insufficient for Java 8 or 11 users — sun.io.useCanonCaches must also be explicitly set to false, otherwise CVE-2024-56337 (incomplete fix) still applies.
  • ·For Java 17, sun.io.useCanonCaches must not be set to true (default is false, so only misconfigured systems are at risk). For Java 21+, no additional configuration is needed.
  • ·Future Tomcat versions (11.0.3, 10.1.35, 9.0.99) will add automatic checks for sun.io.useCanonCaches correctness before allowing default servlet write on case-insensitive file systems, reducing misconfiguration risk.

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_redhat9.8CRITICAL
vendor_ubuntu9.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.