The Apache Software Foundation (ASF) has issued a critical security update addressing a significant vulnerability in its Tomcat server software that could lead to remote code execution (RCE) under specific conditions.
CVE-2024-56337: Incomplete Mitigation of CVE-2024-50379
The vulnerability, identified as CVE-2024-56337, stems from an incomplete fix for CVE-2024-50379, a critical security flaw with a CVSS score of 9.8 that was patched on December 17, 2024.
According to ASF, the issue primarily affects users operating Tomcat on case-insensitive file systems with the default servlet write enabled. If the readonly
initialization parameter is set to false
, additional configuration changes may be necessary depending on the version of Java being used with Tomcat.
Root Cause: TOCTOU Race Condition
Both vulnerabilities are Time-of-Check Time-of-Use (TOCTOU) race condition flaws. These can allow attackers to execute code on case-insensitive file systems when the default servlet has write permissions.
For CVE-2024-50379, Apache highlighted that:
Impacted Versions
CVE-2024-56337 affects the following Apache Tomcat versions:
- Tomcat 11.0.0-M1 to 11.0.1 (fixed in 11.0.2 or later)
- Tomcat 10.1.0-M1 to 10.1.33 (fixed in 10.1.34 or later)
- Tomcat 9.0.0.M1 to 9.0.97 (fixed in 9.0.98 or later)
Mitigation Steps
Users must implement specific configuration updates depending on the Java version:
- Java 8 or Java 11: Explicitly set the system property
sun.io.useCanonCaches
tofalse
(default istrue
). - Java 17: Ensure
sun.io.useCanonCaches
is set tofalse
(it defaults tofalse
). - Java 21 and later: No action required, as the system property has been removed.Credits and Acknowledgments
The ASF credited security researchers Nacl, WHOAMI, Yemoli, and Ruozhi for identifying and reporting these vulnerabilities. It also acknowledged the KnownSec 404 Team for independently reporting CVE-2024-56337 along with proof-of-concept (PoC) code.
Related Security Concerns
This disclosure coincides with the Zero Day Initiative (ZDI) revealing a critical vulnerability in Webmin (CVE-2024-12828, CVSS score: 9.9). The flaw allows authenticated attackers to execute arbitrary code due to improper validation of user-supplied strings in CGI requests.
Conclusion
Organizations relying on Apache Tomcat are strongly urged to update their systems immediately and apply the recommended configurations to minimize the risk of RCE attacks. Security teams must remain vigilant as attackers increasingly exploit unpatched vulnerabilities and misconfigurations.
Stay tuned for more cybersecurity updates and insights.