Proof of Concept for CVE-2025-24813, a Remote Code Execution vulnerability in Apache Tomcat. This PoC exploits unsafe deserialization via crafted session files uploaded through HTTP PUT requests, allowing attackers to execute arbitrary code remotely on vulnerable Tomcat servers.# CVE-2025-24813 Apache Tomcat RCE PoC
## Description
This is a Proof of Concept (PoC) for CVE-2025-24813, a Remote Code Execution (RCE) vulnerability in Apache Tomcat. The vulnerability arises from unsafe deserialization of crafted session files uploaded via HTTP PUT requests, allowing attackers to execute arbitrary code remotely on vulnerable Tomcat servers.
## Vulnerability Details
- **CVE ID:** CVE-2025-24813
- **Affected Software:** Apache Tomcat (versions 9.0.0.M1 to 9.0.98, 10.1.0-M1 to 10.1.34, 11.0.0-M1 to 11.0.2)
- **Type:** Remote Code Execution (RCE)
- **Attack Vector:** HTTP PUT with crafted session payload + HTTP GET to trigger deserialization
- **Impact:** Remote attacker can execute arbitrary Java code on the server
## Prerequisites
- Target must be running a vulnerable version of Apache Tomcat
- HTTP PUT requests must be allowed to upload files to a writable directory
- Ability to trigger deserialization by accessing the uploaded session file
- Java environment for generating payloads (e.g., using ysoserial)
## Usage
1. Generate payload (optional, if not included):
java -jar ysoserial.jar CommonsCollections1 "your_command" > payload.ser
2. Run the PoC script:
python3 CVE-2025-24813.py <target_url> [options]
3. The script will upload the malicious session file and trigger remote code execution.
## Disclaimer
This PoC is for educational and authorized testing purposes only. Do NOT use it on systems without explicit permission. The author is not responsible for any misuse or damage caused by this tool.
## References
- [Apache Tomcat Security Advisory](https://tomcat.apache.org/security.html)
- [CVE-2025-24813 Details](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-24813)
[4.0K] /data/pocs/b107fabfd8ebac2c07e42a37e2c8ee019ed200b5
├── [7.2K] CVE-2025-24813.py
└── [1.7K] README.md
0 directories, 2 files