CVE-2024-50379CWE-367

Apache Tomcat: RCE due to TOCTOU issue in JSP compilation

Critical · published December 17, 2024

CVSS v3.1
9.8
EPSS
32%
Percentile
98.3
In the wild
Unconfirmed
What it is

🚨 A sneaky TOCTOU race condition in Apache Tomcat lets attackers skip through the cracks during JSP compilation, potentially leading to full remote code execution on case-insensitive file systems! 🔥 Think of it like a busy restaurant where the server is checking if a table is ready while the chef is mistakenly serving the wrong meal — if no one is watching closely, the wrong dish goes out, and the diners are left confused. The same happens here, allowing attackers to exploit the timing of checks and usage in the system. With this vulnerability, an attacker could execute arbitrary code on the server, gaining unauthorized access and control over sensitive data or processes. This is absolutely devastating, as it could lead to data breaches or even total server compromise if left unaddressed!

Put simply

Think of it like a busy restaurant where the server is checking if a table is ready while the chef is mistakenly serving the wrong meal — if no one is watching closely, the wrong dish goes out, and the diners are left confused. The same happens here, allowing attackers to exploit the timing of checks and usage in the system. This TOCTOU race condition occurs when the default servlet in Tomcat, configured to allow writes, is exploited during the JSP compilation process. It enables attackers to manipulate the timing of operations, allowing them to gain unauthorized execution capabilities.

What to do

With this vulnerability, an attacker could execute arbitrary code on the server, gaining unauthorized access and control over sensitive data or processes. This is absolutely devastating, as it could lead to data breaches or even total server compromise if left unaddressed! Immediate action is crucial: upgrade to Apache Tomcat versions 11.0.2, 10.1.34, or 9.0.98 to patch this vulnerability. Additionally, review your server configuration to ensure that the default servlet is not enabled for writes unless absolutely necessary. You've got this! Follow these steps to secure your setup and keep your environment safe! 🛡️

The record
Technical detail
CVSS v3.1
9.8 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.31824 · 98.3th percentile
Weakness
CWE-367 · Time-of-check Time-of-use (TOCTOU) Race Condition
Published
2024-12-17T12:34Z
EPSS history
Timeline
  • 25 SEP 03:20Z
    EPSS moved 44% → 32%
    epss
  • 24 SEP 03:17Z
    EPSS moved 44% → 32%
    epss
  • 17 DEC 12:34Z
    Apache Tomcat: RCE due to TOCTOU issue in JSP compilation
    cvelistv5