CVE-2024-50379:
Apache Tomcat Time-of-check Time-of-use (TOCTOU) Race Condition vulnerability
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.99483%
CWE
Published
12/17/2024
Updated
1/3/2025
KEV Status
No
Technology
Java
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
org.apache.tomcat:tomcat-catalina | maven | >= 11.0.0-M1, < 11.0.2 | 11.0.2 |
org.apache.tomcat:tomcat-catalina | maven | >= 10.1.0-M1, < 10.1.34 | 10.1.34 |
org.apache.tomcat:tomcat-catalina | maven | >= 9.0.0.M1, < 9.0.98 | 9.0.98 |
org.apache.tomcat.embed:tomcat-embed-core | maven | >= 11.0.0-M1, < 11.0.2 | 11.0.2 |
org.apache.tomcat.embed:tomcat-embed-core | maven | >= 10.1.0-M1, < 10.1.34 | 10.1.34 |
org.apache.tomcat.embed:tomcat-embed-core | maven | >= 9.0.0.M1, < 9.0.98 | 9.0.98 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper synchronization in DirResourceSet
's locking mechanism. The commit diff shows missing resourceLocksByPath.put()
calls when creating new ResourceLocks
, allowing concurrent threads to bypass file state checks. This enabled race conditions where an attacker could replace a checked file (e.g., .jsp
) with malicious content before compilation. The case-insensitive filesystem aspect exacerbates this by allowing case-variant file replacement. The patch adds the missing put()
operations to ensure lock visibility across threads, directly addressing the TOCTOU
gap.