Apache Tomcat partial PUT CVE-2025–24813 RCE Attempt
Apache Tomcat mishandles partial HTTP PUT requests when filenames contain an internal dot, allowing an attacker to write a serialized Java payload into session storage. The attacker can then trigger deserialization via a crafted JSESSIONID cookie, leading to remote code execution if vulnerable libraries are present.
medium.com
Published on medium.com
CVE-2025–24813 is a critical security vulnerability identified in Apache Tomcat, an open-source web server and servlet container widely used for hosting Java applications. This flaw enables attackers to execute arbitrary code remotely, disclose sensitive information, or inject malicious content into files on affected…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely improper path equivalence handling for filenames with an internal dot during partial PUT, allowing writes to session storage that are later deserialized without validation.
Impact
If the required conditions are met, an attacker could execute arbitrary code remotely, potentially gaining full remote access; otherwise they could view or inject content into security-sensitive files.
What the attacker needed
Default servlet write permissions enabled; Partial PUT support enabled; File-based session persistence with default location; Vulnerable libraries for deserialization
The fix
Upgrade to Tomcat 9.0.99, 10.1.35, or 11.0.3, and optionally disable write permissions and partial PUT support.
How it was found
- Send a partial PUT request with a serialized Java payload.
- The payload is written to Tomcat's session storage as a file.
- Send a GET request with a manipulated JSESSIONID cookie pointing to the malicious session.
- Tomcat deserializes the session data and executes the embedded code.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Tomcat is a Java web server. A feature that lets clients upload files in pieces (partial PUT) had a flaw: if the filename had a dot in the middle, the server could be tricked into writing a malicious file into a place it later reads as session data. When the attacker asks for that session, Tomcat runs the malicious code, giving the attacker control of the server.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.