CVE-2024-56337CWE-367

Apache Tomcat: RCE due to TOCTOU issue in JSP compilation - CVE-2024-50379 mitigation was incomplete

Critical · published December 20, 2024

CVSS v3.1
9.8
EPSS
9%
Percentile
95.3
In the wild
Unconfirmed
What it is

🚨 A sneaky race condition lurks in Apache Tomcat that could let attackers gain unauthorized access! 🔥 Think of it like a busy restaurant where two waiters accidentally take the same order at the same time — one might end up serving the wrong dish to the wrong table! This TOCTOU (Time-of-check Time-of-use) vulnerability allows attackers to exploit timing issues to bypass expected security controls. If exploited, this vulnerability can lead to unauthorized access and manipulation of sensitive data, which could be absolutely devastating for your application's integrity. Imagine an attacker walking in just as the security guard looks away, gaining entry to your most confidential areas!

Put simply

Think of it like a busy restaurant where two waiters accidentally take the same order at the same time — one might end up serving the wrong dish to the wrong table! This TOCTOU (Time-of-check Time-of-use) vulnerability allows attackers to exploit timing issues to bypass expected security controls. This TOCTOU race condition in Apache Tomcat occurs due to insufficient checks being made on file paths when the default servlet's write capability is enabled. This allows attackers to exploit timing discrepancies and potentially perform unauthorized actions on the server.

What to do

If exploited, this vulnerability can lead to unauthorized access and manipulation of sensitive data, which could be absolutely devastating for your application's integrity. Imagine an attacker walking in just as the security guard looks away, gaining entry to your most confidential areas! To protect yourself, update to Tomcat versions 11.0.3, 10.1.35, or 9.0.99 or higher, which will check the setting of the sun.io.useCanonCaches property. If you’re using Java 8 or Java 11, ensure that the system property is set to false, and verify your configurations to maintain security. You've got this! 🛡️ Follow these steps, and you'll be back in the safety zone in no time.

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.08969 · 95.3th percentile
Weakness
CWE-367 · Time-of-check Time-of-use (TOCTOU) Race Condition
Published
2024-12-20T15:28Z
EPSS history
Timeline
  • 20 DEC 15:28Z
    Apache Tomcat: RCE due to TOCTOU issue in JSP compilation - CVE-2024-50379 mitigation was incomplete
    cvelistv5