ZeroHour
Security Affairspublished ()ingested @securityaffairs

Apache Foundation fixed a severe Tomcat vulnerability

Vulnerabilities mentionedAll →

CVEVulnerabilityCVSSEPSSFlagsAffectedExposurePublished
CVE-2024-50379
TOCTOU Race Condition in Apache Tomcat JSP Compilation Enables RCE

CVE-2024-50379 is a time-of-check time-of-use (TOCTOU) race condition (CWE-367) in Apache Tomcat's JSP compilation path that permits unauthenticated remote code execution when Tomcat runs on a case-insensitive file system and the default servlet is enabled for write, which is a non-default configuration. An attacker who can upload or modify files through the write-enabled default servlet can race the JSP compiler so that an altered file is compiled and executed in place of the version that was checked, yielding code execution in the context of the Tomcat process (CVSS 3.1 9.8, network vector with no privileges required). Affected versions are 11.0.0-M1 through 11.0.1, 10.1.0-M1 through 10.1.33, and 9.0.0.M1 through 9.0.97, plus EOL releases 8.5.0 through 8.5.100 and possibly older EOL versions; NetApp products that embed Apache Tomcat are also listed as affected. The flaw is fixed in Tomcat 11.0.2, 10.1.34, and 9.0.98. As of this analysis there is no CISA KEV entry and no public PoC or confirmed in-the-wild exploitation is known, but EPSS assigns a 44.3% probability of exploitation within 30 days (99th percentile), making this a high-priority patch.

Do: Upgrade Tomcat to 11.0.2, 10.1.34, or 9.0.98 as applicable; EOL 8.5.x deployments should migrate to a supported branch since no further 8.5 fixes are listed. Check whether your deployment runs on a case-insensitive file system (e.g., Windows, macOS) and whether the default servlet is enabled for write; if it is read-only, the exposure under the current description is low. NetApp customers should review NetApp security advisories for their products that embed Tomcat.

9.844%
  • Apache Tomcat 11 11.0.0-M1 through 11.0.1 (fixed in 11.0.2)
  • Apache Tomcat 10.1 10.1.0-M1 through 10.1.33 (fixed in 10.1.34)
  • Apache Tomcat 9 9.0.0.M1 through 9.0.97 (fixed in 9.0.98)
  • +2 more
mass≈500,000+ internet-exposed Tomcat instances per public scan counts, with several million total deployments including embedded use
CVE-2024-56337
Time-of-check Time-of-use (TOCTOU) Race Condition vulnerability in 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.

NVD description · AI analysis pending
9.89%
  • apache tomcat
  • apache bootstrap os
Full article286 words · extracted from securityaffairs.com · click to collapse

Pierluigi Paganini December 24, 2024

The Apache Software Foundation fixed a Tomcat server software flaw that could lead to remote code execution under certain conditions.

The Apache Software Foundation (ASF) addressed an important vulnerability, tracked as CVE-2024-56337, in its Tomcat server software. The researchers warn that exploiting this vulnerability could result in remote code execution under certain conditions.

Apache Tomcat is an open-source implementation of the Java Servlet, JavaServer Pages (JSP), Jakarta Expression Language, and WebSocket technologies. It is developed by the Apache Software Foundation and is widely used as a web server and servlet container for running Java-based web applications.

The flaw is a TOCTOU race condition issue in Apache Tomcat that affects versions 11.0.0-M1 through 11.0.1, 10.1.0-M1 through 10.1.33, and 9.0.0.M1 through 9.0.97. The vulnerability is due the incomplete mitigation for CVE-2024-50379 (CVSS score: 9.8).

“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.” reads the advisory.

The CVE-2024-50379 mitigation was incomplete, requiring configuration based on Java version:

  • Java 8/11: Set sun.io.useCanonCaches to false (default is true).
  • Java 17: Ensure sun.io.useCanonCaches is false (default is false).
  • Java 21+: No configuration needed (property removed).

From Tomcat 11.0.3, 10.1.35, and 9.0.99 onward, checks will enforce proper configuration of sun.io.useCanonCaches.

Security researchers Nacl, WHOAMI, Yemoli, and Ruozhi discovered both vulnerabilities. Dawu and Sunflower of the KnownSec 404 Team independently reported this vulnerability, providing a detailed proof-of-concept.

Follow me on Twitter: @securityaffairs and Facebook and Mastodon

Pierluigi Paganini

(SecurityAffairs – hacking, Apache Tomcat)



Text extracted automatically; images, tables and formatting may be missing. Original: https://securityaffairs.com/172273/security/apache-foundation-fixed-tomcat-flaw.html