CVE-2025–24813: Apache Tomcat Path Equivalence Vulnerability $$
Apache Tomcat mishandles path equivalence for filenames containing internal dots, so a crafted PUT request can write files outside the intended upload directory. An attacker could overwrite configuration or session files, potentially leading to remote code execution if deserialisation or a JSP shell is used.
This exploit allows attackers to overwrite sensitive files outside the designated upload directory due to improper path normalization.
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 normalisation of file paths containing internal dots, allowing path traversal during partial PUT writes.
Impact
An attacker could disclose information, modify files, and potentially achieve remote code execution, but this depends on the default servlet being writable and partial PUT being enabled.
What the attacker needed
Default servlet writable (readonly=false); partial PUT enabled (default)
The fix
Upgrade to a patched Tomcat version, or set the default servlet to read-only and disable partial PUT requests.
How it was found
- Ensure the default servlet has write permissions and partial PUT is enabled.
- Send a PUT request with a path containing internal dots to write outside the upload directory.
- For RCE, target session persistence files with a serialised payload or upload a JSP shell to a web-accessible directory.
- Access the uploaded shell via a web request to execute commands.
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. It failed to clean up file paths properly when saving uploaded files, so a request could sneak a file into a folder it should not reach. If that folder holds configuration or session data, an attacker might take over the server.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.