CVE-2024-50379: Apache Tomcat Apache Tomcat Time-of-check Time-of-use (TOCTOU) Vulnerability

HIGH
Advisory Identifier: GHSA-5j33-cvvr-w245
CVSS 9.8
CWE-367
Published
Advisory Summary

CVE-2024-50379 is a HIGH (CVSS 9.8) apache tomcat time-of-check time-of-use (toctou) vulnerability (CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition) affecting Apache Tomcat libraries in the Maven ecosystem. The issue involves apache tomcat time-of-check time-of-use (toctou) race condition vulnerability. Remediation is available by upgrading affected packages to version 11.0.2, 10.1.34, 9.0.98.

CVE-2024-50379 at a Glance

CVE Identifier CVE-2024-50379
GHSA Identifier GHSA-5j33-cvvr-w245
Severity HIGH
CVSS v3.1 Base Score 9.8
CWE Classification CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition
Affected Product Apache Tomcat
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2024-50379

To remediate this vulnerability, upgrade all affected Apache Tomcat dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.apache.tomcat:tomcat-catalina fixed: 11.0.2
<dependency>
    <groupId>org.apache.tomcat</groupId>
    <artifactId>tomcat-catalina</artifactId>
    <version>11.0.2</version>
</dependency>
org.apache.tomcat:tomcat-catalina fixed: 10.1.34
<dependency>
    <groupId>org.apache.tomcat</groupId>
    <artifactId>tomcat-catalina</artifactId>
    <version>10.1.34</version>
</dependency>
org.apache.tomcat:tomcat-catalina fixed: 9.0.98
<dependency>
    <groupId>org.apache.tomcat</groupId>
    <artifactId>tomcat-catalina</artifactId>
    <version>9.0.98</version>
</dependency>
org.apache.tomcat.embed:tomcat-embed-core fixed: 11.0.2
<dependency>
    <groupId>org.apache.tomcat.embed</groupId>
    <artifactId>tomcat-embed-core</artifactId>
    <version>11.0.2</version>
</dependency>
org.apache.tomcat.embed:tomcat-embed-core fixed: 10.1.34
<dependency>
    <groupId>org.apache.tomcat.embed</groupId>
    <artifactId>tomcat-embed-core</artifactId>
    <version>10.1.34</version>
</dependency>
org.apache.tomcat.embed:tomcat-embed-core fixed: 9.0.98
<dependency>
    <groupId>org.apache.tomcat.embed</groupId>
    <artifactId>tomcat-embed-core</artifactId>
    <version>9.0.98</version>
</dependency>
org.apache.tomcat:tomcat-catalina fixed: Latest secure release
<dependency>
    <groupId>org.apache.tomcat</groupId>
    <artifactId>tomcat-catalina</artifactId>
    <version>Latest secure release</version>
</dependency>
org.apache.tomcat.embed:tomcat-embed-core fixed: Latest secure release
<dependency>
    <groupId>org.apache.tomcat.embed</groupId>
    <artifactId>tomcat-embed-core</artifactId>
    <version>Latest secure release</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.apache.tomcat

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2024-50379, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.apache.tomcat

Analyze the terminal output to locate any version of Apache Tomcat in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 11.0.2), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.apache.tomcat command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition, where the product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check. In Apache Tomcat, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Time-of-check Time-of-use (TOCTOU) Race Condition vulnerability during JSP compilation in Apache Tomcat permits an RCE on case insensitive file systems when the default servlet is enabled for write (non-default configuration). 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. Users are recommended to upgrade to version 11.0.2, 10.1.34 or 9.0.98, which fixes the issue.

CVE-2024-50379 Affected Apache Tomcat Versions

8 component(s)
Fixed Versions:
11.0.210.1.349.0.98
Product / Package Ecosystem Affected Versions Fixed 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
org.apache.tomcat:tomcat-catalina
Maven
≥ 8.5.0
≤ 8.5.100
org.apache.tomcat.embed:tomcat-embed-core
Maven
≥ 8.5.0
≤ 8.5.100

References

NVD — CVE-2024-50379 NVD
https://nvd.nist.gov/vuln/detail/CVE-2024-50379
Security Fix Commit FIX COMMIT
https://github.com/apache/tomcat/commit/05ddeeaa54df1e2dc427d0164bedd6b79f78d81f
Security Fix Commit FIX COMMIT
https://github.com/apache/tomcat/commit/43b507ebac9d268b1ea3d908e296cc6e46795c00
Security Fix Commit FIX COMMIT
https://github.com/apache/tomcat/commit/631500b0c9b2a2a2abb707e3de2e10a5936e5d41
Security Fix Commit FIX COMMIT
https://github.com/apache/tomcat/commit/684247ae85fa633b9197b32391de59fc54703842
Security Fix Commit FIX COMMIT
https://github.com/apache/tomcat/commit/8554f6b1722b33a2ce8b0a3fad37825f3a75f2d2
Security Fix Commit FIX COMMIT
https://github.com/apache/tomcat/commit/cc7a98b57c6dc1df21979fcff94a36e068f4456c
Apache Tomcat Source Repository REPOSITORY
https://github.com/apache/tomcat
lists.apache.org/thread/y6lj6q1xnp82... WEB
https://lists.apache.org/thread/y6lj6q1xnp822g6ro70tn19sgtjmr80r
lists.debian.org/debian-lts-announce... WEB
https://lists.debian.org/debian-lts-announce/2025/01/msg00009.html
Apache Tomcat Security Information SECURITY
https://security.netapp.com/advisory/ntap-20250103-0003
Apache Tomcat Security Information SECURITY
https://tomcat.apache.org/security-10.html#Fixed_in_Apache_Tomcat_10.1.34
Apache Tomcat Security Information SECURITY
https://tomcat.apache.org/security-11.html#Fixed_in_Apache_Tomcat_11.0.2
Apache Tomcat Security Information SECURITY
https://tomcat.apache.org/security-9.html#Fixed_in_Apache_Tomcat_9.0.98
Apache Tomcat Security Information SECURITY
http://www.openwall.com/lists/oss-security/2024/12/17/4
Apache Tomcat Security Information SECURITY
http://www.openwall.com/lists/oss-security/2024/12/18/2

Frequently Asked Questions

What is CVE-2024-50379?
CVE-2024-50379 is a security vulnerability in Apache Tomcat involving Apache Tomcat Time-of-check Time-of-use (TOCTOU) Race Condition vulnerability under CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition.
Which Apache Tomcat versions are affected?
Affected versions include releases prior to 11.0.2, 10.1.34, 9.0.98 across affected packages: org.apache.tomcat:tomcat-catalina, org.apache.tomcat.embed:tomcat-embed-core.
What version fixes CVE-2024-50379?
Upgrading to 11.0.2, 10.1.34, 9.0.98 (or the latest patched release for your respective branch) resolves the vulnerability.
Is tomcat-catalina affected?
Yes, org.apache.tomcat:tomcat-catalina is affected in releases prior to 11.0.2, 10.1.34, 9.0.98, Latest secure release. Upgrade your dependency to 11.0.2, 10.1.34, 9.0.98, Latest secure release or later.
Is tomcat-embed-core affected?
Yes, org.apache.tomcat.embed:tomcat-embed-core is affected in releases prior to 11.0.2, 10.1.34, 9.0.98, Latest secure release. Upgrade your dependency to 11.0.2, 10.1.34, 9.0.98, Latest secure release or later.
What is the CVSS score of CVE-2024-50379?
CVE-2024-50379 has a CVSS v3.1 base score of 9.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2024-50379?
CVE-2024-50379 is classified under CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition (The product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check.).
How can I check Maven dependencies for CVE-2024-50379?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.tomcat'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-5j33-cvvr-w245",
  "modified" : "2025-11-03T21:31:45Z",
  "published" : "2024-12-17T15:31:43Z",
  "aliases" : [ "CVE-2024-50379" ],
  "summary" : "Apache Tomcat Time-of-check Time-of-use (TOCTOU) Race Condition vulnerability",
  "details" : "Time-of-check Time-of-use (TOCTOU) Race Condition vulnerability during JSP compilation in Apache Tomcat permits an RCE on case insensitive file systems when the default servlet is enabled for write (non-default configuration).\n\nThis 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.\n\nUsers are recommended to upgrade to version 11.0.2, 10.1.34 or 9.0.98, which fixes the issue.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.tomcat:tomcat-catalina"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "11.0.0-M1"
      }, {
        "fixed" : "11.0.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.tomcat:tomcat-catalina"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.1.0-M1"
      }, {
        "fixed" : "10.1.34"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.tomcat:tomcat-catalina"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "9.0.0.M1"
      }, {
        "fixed" : "9.0.98"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.tomcat.embed:tomcat-embed-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "11.0.0-M1"
      }, {
        "fixed" : "11.0.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.tomcat.embed:tomcat-embed-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.1.0-M1"
      }, {
        "fixed" : "10.1.34"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.tomcat.embed:tomcat-embed-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "9.0.0.M1"
      }, {
        "fixed" : "9.0.98"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.tomcat:tomcat-catalina"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.5.0"
      }, {
        "last_affected" : "8.5.100"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.tomcat.embed:tomcat-embed-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.5.0"
      }, {
        "last_affected" : "8.5.100"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-50379"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/tomcat/commit/05ddeeaa54df1e2dc427d0164bedd6b79f78d81f"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/tomcat/commit/43b507ebac9d268b1ea3d908e296cc6e46795c00"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/tomcat/commit/631500b0c9b2a2a2abb707e3de2e10a5936e5d41"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/tomcat/commit/684247ae85fa633b9197b32391de59fc54703842"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/tomcat/commit/8554f6b1722b33a2ce8b0a3fad37825f3a75f2d2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/tomcat/commit/cc7a98b57c6dc1df21979fcff94a36e068f4456c"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/tomcat"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/y6lj6q1xnp822g6ro70tn19sgtjmr80r"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2025/01/msg00009.html"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20250103-0003"
  }, {
    "type" : "WEB",
    "url" : "https://tomcat.apache.org/security-10.html#Fixed_in_Apache_Tomcat_10.1.34"
  }, {
    "type" : "WEB",
    "url" : "https://tomcat.apache.org/security-11.html#Fixed_in_Apache_Tomcat_11.0.2"
  }, {
    "type" : "WEB",
    "url" : "https://tomcat.apache.org/security-9.html#Fixed_in_Apache_Tomcat_9.0.98"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2024/12/17/4"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2024/12/18/2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-367" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-12-17T16:39:38Z",
    "nvd_published_at" : "2024-12-17T13:15:18Z"
  }
}