MODERATE 5.9

CVE-2025-41242

Spring Framework MVC Applications Path Traversal Vulnerability

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.

Affected Maven artifacts (1)

ArtifactAffected versionsFixed in
org.springframework » spring-webmvc
>= 5.3.0, <= 5.3.43>= 6.0.0, <= 6.0.29>= 6.1.0, <= 6.1.21>= 6.2.0, < 6.2.10
6.2.10

Blast radius

1affected artifacts
132affected versions
16,985dependent artifacts (est.)
573,891dependent versions

71% of the dependent artifacts (12,142) still pull an affected version in their latest release.

DepthDependent versions
Direct
91,723
2 hops
197,614
3 hops
165,579
4 hops
89,936
5 hops
22,420
6 hops
6,619

Most used dependents

Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.

References

Advisorynvd.nist.gov
Packagegithub.com
Webspring.io