## https://sploitus.com/exploit?id=7E7D0518-9B94-5F1B-9675-F70AFB2527B1
# CVE-2025-24813-Scanner
# CVE-2025-24813 - Apache Tomcat Vulnerability Scanner
## Overview
CVE-2025-24813 is a critical security vulnerability in **Apache Tomcat**, allowing attackers to exploit improperly handled **partial PUT requests**. This vulnerability can lead to **Remote Code Execution (RCE)**, **data leaks**, and **file uploads** that could compromise the server.
This repository provides a Python-based scanner (`CVE-2025-24813.py`) to check if a target Apache Tomcat server is vulnerable.
---
## Affected Versions
The following **Apache Tomcat** versions are affected:
- **9.0.0.M1 to 9.0.98**
- **10.1.0-M1 to 10.1.34**
- **11.0.0-M1 to 11.0.2**
If your server runs any of these versions, you should **immediately update** to a patched version.
---
## How the Exploit Works
The vulnerability arises from Tomcat’s mishandling of **partial PUT requests**. Attackers can:
- Upload malicious JSP files
- Bypass security restrictions
- Execute arbitrary code on the server
The scanner tests for this vulnerability by sending a **PUT request** with a test file and checking the server’s response.
---
## Installation
Clone the repository and install the required dependencies:
```sh
git clone https://github.com/issamjr/CVE-2025-24813-Scanner.git
cd CVE-2025-24813-Scanner
pip install -r requirements.txt
```
## Usage
Run the scanner against a target server:
```sh
python3 CVE-2025-24813.py http://target-ip:port
```
Example:
```sh
python3 CVE-2025-24813.py http://192.168.1.1:8080
```
### Output:
- **Vulnerable Server** (Green Output):
```
[+] Target is vulnerable to CVE-2025-24813!
```
- **Not Vulnerable** (Red Output):
```
[-] Target is not vulnerable.
```
- **Connection Issues** (Yellow Output):
```
[!] Failed to connect to target.
```
---
## Mitigation
To protect your server from CVE-2025-24813:
1. **Update Apache Tomcat** to the latest patched version:
- **9.0.99 or later**
- **10.1.35 or later**
- **11.0.3 or later**
2. **Disable Partial PUT Requests** if not needed.
3. **Monitor Logs** for unauthorized file uploads.
## References
- [Apache Security Advisory](https://tomcat.apache.org/security-2025.html)
- [Security Online Report](https://securityonline.info/cve-2025-24813-flaw-in-apache-tomcat-exposes-servers-to-rce-data-leaks-update-immediately/)
- [IONIX Blog on CVE-2025-24813](https://www.ionix.io/blog/apache-tomcat-path-equivalence-vulnerability-cve-2025-24813/)