Spring Framework MVC applications can be vulnerable to a Path Traversal Vulnerability when deployed on a non-compliant Servlet container. This vulnerability occurs when the application is deployed as a WAR or with an embedded Servlet container, and the container does not reject suspicious sequences. Applications deployed on Apache Tomcat or Eclipse Jetty are not vulnerable if default security features are enabled.
Details
| Severity | Base Score | CVE |
|---|---|---|
| MEDIUM | 5.9 | CVE-2025-41242 |
Exploitation
To exploit this vulnerability, an attacker can craft a request that includes suspicious sequences in the URI path, targeting applications deployed on non-compliant Servlet containers. If the container does not properly handle these sequences, it may allow the attacker to access sensitive files or directories outside the intended scope of the application.
Affected Products
- Spring Framework MVC: Vulnerable when deployed on non-compliant Servlet containers without proper security configurations.
- Embedded Servlet Containers: Applications using embedded containers may also be at risk if not configured correctly.
Mitigation
To mitigate this vulnerability, it is recommended to upgrade the application to ensure compliance with Servlet container specifications. Additionally, ensure that default security features are enabled in the configuration of the Servlet container to prevent exploitation.
