
CVE-2024-50379 is a critical vulnerability affecting multiple versions of Apache Tomcat, an open source web server and servlet container widely used for deploying Java-based web applications. The vulnerability arises from a Time-of-Use (TOCTOU) race condition that occurs when compiling JavaServer Pages (JSPs).
This repository contains a proof of concept (PoC) script to exploit CVE-2024-50379, a vulnerability in Apache Tomcat. The vulnerability is a Time-of-Check Time-of-Use (TOCTOU) race condition that can lead to remote code execution (RCE) if the server's configuration allows writable directories.
requests
pip3 install requests
Ensure you have a vulnerable version of Apache Tomcat (e.g., 10.1.33) configured with:
/uploads directory.upload.jsp).To run the script, use the following command:
python3 poc.py <command>