Skip to main content
Mallory
CriticalPublic exploitVulnerability

CVE-2024-50379: Apache Tomcat JSP Compilation TOCTOU Remote Code Execution

Published Dec 17, 2024 · Updated 1 day ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 days1 mention · peak 1 in a dayToday
CVSS9.8Critical · v3.1
EPSS42.7%99th percentile
CISA KEVNoNot listed
In the wildNonePublic exploit, no exploitation reported
Vendors
NetAppApache Software Foundation
IdentifiersCVE-2024-50379CWE-367 · Time-of-check Time-of-use (TOCTOU)…

CVE-2024-50379 is a time-of-check time-of-use race condition during JSP compilation in Apache Tomcat. On case-insensitive file systems, a remote unauthenticated attacker can exploit specially crafted file uploads to achieve remote code execution when the Default servlet is configured to permit writes, a non-default setting. Affected releases are 11.0.0-M1 through 11.0.1, 10.1.0-M1 through 10.1.33, and 9.0.0.M1 through 9.0.97. End-of-life releases 8.5.0 through 8.5.100 are also affected; older unsupported releases may be affected.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation permits arbitrary code execution with the privileges of the Tomcat process, potentially compromising the confidentiality, integrity, and availability of the application and resources accessible to that process. Consequences can include disclosure or modification of application data and disruption of hosted services. Operating-system-level access is constrained by the Tomcat service account's privileges.

Mitigation

If you can’t patch tonight, do this now.

Disable writes through the Default servlet by restoring its read-only configuration, readonly=true. This removes a required exploitation condition. If write-enabled operation on a case-insensitive file system must continue after applying the initial Tomcat fix, also address the related canonical-path caching issue: set sun.io.useCanonCaches=false on Java 8 and Java 11; on Java 17, ensure the property is false if explicitly configured. Java 21 and later do not require this property because the problematic cache was removed. Cache configuration alone should not replace the Tomcat update.

Remediation

Patch, then assume compromise.

Upgrade Apache Tomcat to at least 11.0.2, 10.1.34, or 9.0.98 in the corresponding release branch, preferably to a current supported release. Migrate affected Tomcat 8.5 installations to a supported, fixed branch. For products embedding Tomcat, install the applicable vendor update. Account for the incomplete mitigation tracked as CVE-2024-56337: affected Java configurations also require appropriate canonical-path cache settings. Tomcat 11.0.3, 10.1.35, and 9.0.99 onward add checks for these settings before permitting write-enabled Default servlet operation on case-insensitive file systems.

Public exploits

Exploits

12 exploits validated by Mallory's analysis. Hidden: 2 rejected by Mallory's analysis as not a working exploit; 1 not yet analyzed, such as Exploit-DB entries.

View more in app →
CVE-2024-50379-PoCThis repository contains a Python exploit script targeting Apache Tomcat servers vulnerable to CVE-2024-50379. The main file, 'ApachTomcat_CVE-2024-50379_ConditionalCompetitionToRce.py', attempts to exploit a race condition by concurrently uploading JSP files ('aa.Jsp' and 'bb.Jsp') containing a payload that executes 'calc.exe' on the server, demonstrating remote code execution. The script supports both single and batch URL testing, as described in the README. It uses a high number of threads (10,000) to increase the likelihood of successful exploitation. The endpoints '/aa.Jsp', '/bb.Jsp', '/aa.jsp', and '/bb.jsp' are used for uploading and accessing the malicious JSP files. The exploit is operational, providing a working RCE payload, and is intended for use against Tomcat servers accessible over HTTP or HTTPS.iSee857 · Disclosed Dec 20, 2024 · python · networkOperationalCVE-2024-50379This repository provides an exploit for Apache Tomcat CVE-2024-50379, a vulnerability that allows unauthenticated attackers to upload and execute arbitrary JSP files via a race condition in file handling. The main exploit script (CVE-2024-50379.py) is a Python tool that takes a target URL or a list of URLs and a payload file (upload.txt), then attempts to upload the payload as a JSP webshell to several endpoints (e.g., /asd.Jsp, /qwe.Jsp, /1.jsp, /2.jsp) using a high degree of concurrency (10,000 threads). The payload (upload.txt) is a JSP webshell that, once uploaded, can be used to write additional JSP files to the server, enabling persistent remote code execution. The README.md provides usage instructions and describes how to verify successful exploitation by checking for the presence and output of /2.jsp and /1.jsp. The repository is structured with a Python exploit script, a JSP payload, and documentation. The exploit is operational and provides a working webshell if the target is vulnerable.dear-cell · Disclosed Dec 23, 2024 · python · jsp · networkOperationalCVE-2024-50379-POCThis repository provides a Python-based proof-of-concept exploit for CVE-2024-50379, targeting servers (notably Apache Tomcat) with insecure file upload handling. The exploit script (exploit_cve_2024_50379.py) automates the process of uploading a malicious JSP web shell to the /uploads directory of a vulnerable server via the /uploads/upload.jsp endpoint. Once uploaded, the shell (shell.jsp) can be accessed at /uploads/shell.jsp, allowing the attacker to execute arbitrary system commands through an interactive command-line interface. The script includes features such as automatic URL formatting, retry logic for uploads and command execution, and basic HTML output parsing. The repository is structured with a single exploit script, a README providing detailed usage instructions, and a license file. The exploit is operational, providing a working payload and interactive exploitation capability, but is not part of a larger exploitation framework.dragonked2 · Disclosed Dec 25, 2024 · python · networkOperationalCVE-2024-50379-expThis repository contains a Python exploit script (CVE-2024-50379.py) and a README for CVE-2024-50379, a race condition vulnerability in certain web servers that allows arbitrary file upload. The exploit works by rapidly sending concurrent HTTP PUT and GET requests to the target server, attempting to upload a malicious JSP file (webshell or arbitrary payload) and then access it. The script supports user-supplied payloads via the '-f' argument and can target a single URL or a list of URLs from a file. The exploit attempts a 6-second race condition attack first, followed by a user-specified or default 10-second attack if the first fails. If successful, the uploaded JSP file (with a random MD5-based filename) can be accessed to achieve remote code execution. The repository is structured simply, with the main exploit logic in the Python script and usage instructions in the README. The attack vector is network-based, targeting web servers via HTTP PUT/GET requests. All endpoints used for exploitation are dynamically generated per run, making detection more difficult.gomtaengi · Disclosed Dec 28, 2024 · python · networkOperationalCVE-2024-50379This repository contains a Python exploit script (exploit.py) targeting CVE-2024-50379, a vulnerability in web servers (notably Apache Tomcat or similar) that allows arbitrary file uploads to the /uploads directory. The exploit automates the process of uploading a JSP web shell (shell.jsp) to the vulnerable server via the /uploads/upload.jsp endpoint. Once uploaded, the attacker can interactively send system commands to the server by accessing /uploads/shell.jsp with the 'cmd' parameter, receiving the command output in response. The script includes logic for server reachability checks, upload retries, and a command execution loop. The payload is a standard JSP web shell capable of executing arbitrary commands. The repository is structured with a single exploit script, a README with usage instructions, and standard project files (.gitignore, LICENSE).pwnosec · Disclosed Jan 23, 2025 · python · networkOperationalCVE-2024-50379This repository contains a working exploit for CVE-2024-50379, a critical remote code execution vulnerability in Apache Tomcat. The main file, CVE-2024-50379.py, is a Python script that attempts to upload a malicious JSP reverse shell to a Tomcat server by exploiting a time-of-check-to-time-of-use (TOCTOU) race condition using 500 concurrent threads. The script targets endpoints such as http://localhost:8080/shell.Jsp and http://localhost:8080/shell.jsp, attempting to bypass security checks and achieve successful upload and execution of the shell. The payload is a JSP script that, when triggered, connects back to the attacker's machine (192.168.122.150:4444) to provide a reverse shell. The README.md provides background information and context about the vulnerability and the exploit's purpose. The exploit is operational and demonstrates a real-world attack scenario against vulnerable Tomcat servers.thunww · Disclosed Mar 30, 2025 · python · jsp · networkOperationalCVE-2024-50379-POCThis repository contains a Python proof-of-concept exploit for CVE-2024-50379. The main file, 'Exploit-poc.py', is a command-line tool that targets web servers vulnerable to this CVE. It works by uploading a malicious JSP file ('/rce.jsp') to the target server using an HTTP PUT request. The JSP payload executes the 'whoami' command on the server and returns the output, demonstrating remote code execution. The script supports scanning single or multiple targets (from a file) and uses multithreading for efficiency. The exploit disables SSL verification and suppresses related warnings for compatibility with misconfigured servers. The repository also includes a minimal README.md. No hardcoded IPs or domains are present; the user supplies targets via command-line arguments. The exploit is operational, providing a working payload and demonstrating the vulnerability.Yuri08loveElaina · Disclosed Jun 14, 2025 · python · networkOperationalCVE-2024-50379This repository contains a Python exploit script (exploit.py) targeting Apache Tomcat servers vulnerable to CVE-2024-50379. The exploit attempts to upload a malicious JSP file to the server using HTTP PUT requests to /aa.Jsp and /bb.Jsp, then checks for successful upload and execution by sending GET requests to /aa.jsp and /bb.jsp. The payload in the JSP attempts to execute a reverse shell using ncat, providing the attacker with remote code execution capabilities. The script supports both single URL and batch URL modes (via a text file). The exploit is operational, as it provides a working payload and automates the attack process. The README.md is minimal and only references the CVE. No hardcoded IP addresses or domains are present, but the payload expects the attacker to replace CONNECTION_IP with their own address. The main attack vector is network-based, targeting accessible Tomcat servers over HTTP/HTTPS.Yuri08loveElaina · Disclosed Jun 14, 2025 · python · networkOperationalTomcatRace-CVE-2024-50379The repository contains three files: README.md documents CVE-2024-50379, affected version ranges, prerequisites, usage, and mitigation; exploit.py is a standalone Python exploitation CLI; poc.py is a companion assessment and race-demonstration CLI. Both scripts use requests and urllib3, expose proxy and timeout options, and disable urllib3 insecure-request warnings. Much of the visible source is decorative banner code, while central HTTP, payload, and race implementations are truncated. The documented technique races HTTP PUT requests for uppercase JSP filenames against GET requests for lowercase equivalents on a case-insensitive filesystem. With writable DefaultServlet resources, the intended outcome is JSP compilation and execution despite resource-state checks. exploit.py exposes command execution and reverse-shell modes, with defaults of 30 threads and 10 rounds. Its visible cleanup method issues DELETE requests for entries in self.deployed and clears that list. Because standalone cleanup creates a new exploit object and the deployment-tracking implementation is omitted, removal of artifacts from earlier runs is not established. poc.py exposes version checking, PUT capability checking, case-insensitivity probing, a race demonstration, and a combined scan. The demonstration reports successful PUTs, JSP execution hits, and misses, so this repository is not merely a passive version detector. These checks can modify target resources. No framework integration or fixed command-and-control endpoint is evident. Target URLs, proxy settings, and callback parameters are operator-supplied; the visible addresses are documentation examples. The README's advisory and attribution links are references, not demonstrated runtime requests. The material is consistent with an exploitation attempt, but omitted code prevents verification of payload contents, complete syntax, HTTP behavior, success detection, or practical reliability. OPERATIONAL maturity reflects the exposed payload-bearing interface, not independently validated execution. The original repository URL, git reference, and archive size were not supplied; empty strings and zero represent unavailable metadata. Listed source-file sizes total 33,104 bytes, which is not an archive-size measurement.Ghost-Bx1 · Disclosed Oct 27, 2026 · python · web · networkOperationalCVE-2024-50379-POCThis repository provides a Proof of Concept (POC) exploit for CVE-2024-50379, a TOCTOU (Time-of-Check Time-of-Use) race condition vulnerability in Apache Tomcat. The exploit targets Tomcat servers running on case-insensitive file systems (such as Windows) with misconfigured Default Servlet permissions that allow file uploads and overwrites. The repository contains two main JSP files: - 'upload.jsp': Implements a file upload handler that saves uploaded files to an 'uploads/' directory on the server. This is used to upload arbitrary JSP files. - 'hello.jsp': A sample payload JSP that, when executed, runs the command 'cmd /c start calc.exe' (demonstrating code execution on Windows). The attack involves uploading a malicious JSP file and exploiting the case-insensitive file system to overwrite an existing file, thereby achieving remote code execution. The README provides detailed exploitation steps and security considerations. No hardcoded IP addresses or network endpoints are present, but the attack is performed over HTTP(S) to the Tomcat server. The exploit is a POC and not weaponized, but demonstrates the vulnerability and its impact clearly.v3153 · Disclosed Dec 18, 2024 · jsp · networkPoCCVE-2024-50379This repository provides a proof-of-concept exploit for CVE-2024-50379, a TOCTOU race condition in Apache Tomcat that can lead to remote code execution if the server is misconfigured. The exploit consists of a Python script (poc.py) that uploads a malicious JSP web shell to a writable directory on the target Tomcat server via an upload handler (upload.jsp). Once uploaded, the script accesses the shell via HTTP and sends arbitrary system commands for execution. The repository includes a README with setup and usage instructions, and the exploit requires a vulnerable Tomcat instance with a writable /uploads directory and an upload handler. The main attack vector is network-based, targeting the Tomcat server's file upload functionality. The payload is a JSP web shell capable of executing arbitrary commands received via the 'cmd' parameter.Alchemist3dot14 · Disclosed Dec 20, 2024 · python · networkPoCTomcat-CVE-2024-50379-PocThis repository is a Proof-of-Concept (PoC) exploit for CVE-2024-50379, a race condition vulnerability in Apache Tomcat that allows remote code execution. The main exploit logic is implemented in 'main.go' using the Go programming language. The exploit works by concurrently sending a large number of HTTP PUT and GET requests to the target Tomcat server, attempting to upload a malicious JSP payload ('aa.Jsp' and 'bb.Jsp') and then trigger its execution. The payload is a JSP script that writes a webshell ('poc.jsp') to the Tomcat webapps/ROOT directory, enabling further remote code execution. The repository is structured simply, with a single Go source file, standard Go module files, and documentation. The exploit is not weaponized but serves as a functional PoC for testing the vulnerability. The only required input is the base URL of the target Tomcat server, provided via the '-u' command-line flag.ph0ebus · Disclosed Dec 21, 2024 · go · networkPoC
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Apache Software FoundationTomcatapplication
NetAppBootstrap Osoperating_system
FAQ

Frequently asked questions

Is CVE-2024-50379 exploited in the wild?
As of Nov 16, 2026, Mallory has no reports of CVE-2024-50379 being exploited in the wild. It is not listed in CISA KEV.
Is there a public exploit for CVE-2024-50379?
Yes. Mallory tracks 12 public exploits or proofs of concept for CVE-2024-50379, the earliest disclosed Dec 18, 2024.
Is there a patch for CVE-2024-50379?
Upgrade Apache Tomcat to at least 11.0.2, 10.1.34, or 9.0.98 in the corresponding release branch, preferably to a current supported release. Migrate affected Tomcat 8.5 installations to a supported, fixed branch.
What products are affected by CVE-2024-50379?
Apache Software Foundation Tomcat and NetApp Bootstrap Os.
How severe is CVE-2024-50379?
CVE-2024-50379 has a CVSS v3.1 score of 9.8 (Critical) and an EPSS score of 42.7% (99th percentile) as of Nov 16, 2026.
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signatures1YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity4Community discussion across Reddit, Mastodon, and other social sources.