Miggo Logo

CVE-2025-24813:
Apache Tomcat: Potential RCE and/or information disclosure and/or information corruption with partial PUT

9.8

CVSS Score

Basic Information

EPSS Score
-
Published
3/10/2025
Updated
3/19/2025
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.apache.tomcat:tomcat-catalinamaven>= 11.0.0-M1, < 11.0.311.0.3
org.apache.tomcat:tomcat-catalinamaven>= 10.1.0-M1, < 10.1.3510.1.35
org.apache.tomcat:tomcat-catalinamaven>= 9.0.0.M1, < 9.0.999.0.99
org.apache.tomcat.embed:tomcat-embed-coremaven>= 11.0.0-M1, < 11.0.311.0.3
org.apache.tomcat.embed:tomcat-embed-coremaven>= 10.1.0-M1, < 10.1.3510.1.35
org.apache.tomcat.embed:tomcat-embed-coremaven>= 9.0.0.M1, < 9.0.999.0.99

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from two key functions in DefaultServlet.java: 1) doPut() managed partial uploads but delayed temp file cleanup (via deleteOnExit()), and 2) executePartialPut() used path-based filenames with slash-to-dot conversion. Together, these allowed path traversal via 'internal dot' equivalence and file retention long enough for attackers to exploit session persistence or deserialization. The patch replaced manual filename construction with secure temp files and immediate deletion, confirming these functions' roles.

Vulnerable functions

org.apache.catalina.servlets.DefaultServlet.doPut
java/org/apache/catalina/servlets/DefaultServlet.java
Handles partial PUT requests with insecure temporary file creation using path-based names (CWE-44). The original implementation converted '/' to '.' in paths, enabling path equivalence attacks. Temporary files were only marked for deletion on JVM exit, leaving a window for exploitation.
org.apache.catalina.servlets.DefaultServlet.executePartialPut
java/org/apache/catalina/servlets/DefaultServlet.java
Created temporary files using user-controlled path data with unsafe name conversion (path.replace('/', '.')). This allowed attackers to write files to unexpected locations via internal dot manipulation, enabling session file corruption or RCE through deserialization (CWE-502).

WAF Protection Rules

WAF Rule

P*t* *quiv*l*n**: '*il*.N*m*' (Int*rn*l *ot) l***in* to R*mot* *o** *x**ution *n*/or In*orm*tion *is*losur* *n*/or m*li*ious *ont*nt ***** to uplo**** *il*s vi* writ* *n**l** ****ult S*rvl*t in *p**** Tom**t. T*is issu* *****ts *p**** Tom**t: *rom *

Reasoning

T** vuln*r**ility st*ms *rom two k*y *un*tions in ****ultS*rvl*t.j*v*: *) *oPut() m*n**** p*rti*l uplo**s *ut **l*y** t*mp *il* *l**nup (vi* **l*t*On*xit()), *n* *) *x**ut*P*rti*lPut() us** p*t*-**s** *il*n*m*s wit* sl*s*-to-*ot *onv*rsion. To**t**r,