CVE-2025-41242 CVE-2025-41242: Path traversal vulnerability on non-compliant Servlet containers

Medium 5.9 Published Updated

Attackers can read arbitrary files if Spring MVC serves static resources on a non-compliant Servlet container that fails to reject suspicious sequences.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-41242?

CVE-2025-41242 is a medium-severity path traversal vulnerability in VMware Spring Framework, published on 18 Aug 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Spring Framework MVC applications can be vulnerable to a “Path Traversal Vulnerability” when deployed on a non-compliant Servlet container.

An application can be vulnerable when all the following are true:

* the application is deployed as a WAR or with an embedded Servlet container * the Servlet container does not reject suspicious sequences https://jakarta.ee/specifications/servlet/6.1/jakarta-servlet-spec-6.1.html#uri-path-canonicalization * the application serves static resources https://docs.spring.io/spring-framework/reference/web/webmvc/mvc-config/static-resources.html#page-title  with Spring resource handling

We have verified that applications deployed on Apache Tomcat or Eclipse Jetty are not vulnerable, as long as default security features are not disabled in the configuration. Because we cannot check exploits against all Servlet containers and configuration variants, we strongly recommend upgrading your application.

Weakness: CWE-22

Which versions are affected by CVE-2025-41242?

8 open source packages ship an affected version, including org.springframework:spring-webmvc.

PackageAffectedFixed in
org.springframework:spring-webmvc MavenFrom 5.3.0 to 5.3.43None
org.springframework:spring-webmvc MavenFrom 5.3.0 to 5.3.43None
org.springframework:spring-webmvc MavenFrom 6.0.0 to 6.0.29None
org.springframework:spring-webmvc MavenFrom 6.0.0 to 6.0.29None
org.springframework:spring-webmvc MavenFrom 6.1.0 to 6.1.21None
org.springframework:spring-webmvc MavenFrom 6.1.0 to 6.1.21None
2 more packages
org.springframework:spring-webmvc MavenFrom 6.2.06.2.10
org.springframework:spring-webmvc MavenFrom 6.2.06.2.10

How do I fix CVE-2025-41242?

Upgrade org.springframework:spring-webmvc to 6.2.10 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2025-41242 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-41242 exists.

Public exploit code: 1 Nuclei template and 1 proofs of concept on GitHub.

Sources

Also known as CLEANSTART-2026-AL61083, CLSA-2026-1786369191, CLSA-2026-1786423599, CLSA-2026-1786424014, CLSA-2026-1786426050, DEBIAN-CVE-2025-41242 and 8 more.

Is CVE-2025-41242 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free