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

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

- **Severity:** Medium 5.9 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 18 Aug 2025
- **Updated:** 25 Aug 2025
- **Also known as:** CLEANSTART-2026-AL61083, CLSA-2026-1786369191, CLSA-2026-1786423599, CLSA-2026-1786424014, CLSA-2026-1786426050, DEBIAN-CVE-2025-41242, ECHO-ad95-71e3-575b, GHSA-r936-gwx5-v52f, MINI-7528-953p-h52p, MINI-9qpx-cv8r-95qh, MINI-m8qq-xcpp-897h, MINI-pq2q-52h6-8m8c, ROOT-APP-MAVEN-CVE-2025-41242, UBUNTU-CVE-2025-41242

## 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 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2025-41242?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.springframework:spring-webmvc` | Maven | From 5.3.0 to 5.3.43 | None |
| `org.springframework:spring-webmvc` | Maven | From 5.3.0 to 5.3.43 | None |
| `org.springframework:spring-webmvc` | Maven | From 6.0.0 to 6.0.29 | None |
| `org.springframework:spring-webmvc` | Maven | From 6.0.0 to 6.0.29 | None |
| `org.springframework:spring-webmvc` | Maven | From 6.1.0 to 6.1.21 | None |
| `org.springframework:spring-webmvc` | Maven | From 6.1.0 to 6.1.21 | None |
| `org.springframework:spring-webmvc` | Maven | From 6.2.0 | 6.2.10 |
| `org.springframework:spring-webmvc` | Maven | From 6.2.0 | 6.2.10 |

## How do I fix CVE-2025-41242?

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

## 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:

- CVE-2025-41242 (github_poc): https://github.com/HORKimhab/CVE-2025-41242
- Spring Framework - Path Traversal (nuclei): http/cves/2025/CVE-2025-41242.yaml

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-41242 and fix it if it is affected.

What it is: 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.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-41242 exists.

Affected packages and fixed versions:
- org.springframework:spring-webmvc (Maven): affected from 5.3.0 up to 5.3.43; no fix listed
- org.springframework:spring-webmvc (Maven): affected from 5.3.0 up to 5.3.43; no fix listed
- org.springframework:spring-webmvc (Maven): affected from 6.0.0 up to 6.0.29; no fix listed
- org.springframework:spring-webmvc (Maven): affected from 6.0.0 up to 6.0.29; no fix listed
- org.springframework:spring-webmvc (Maven): affected from 6.1.0 up to 6.1.21; no fix listed
- org.springframework:spring-webmvc (Maven): affected from 6.1.0 up to 6.1.21; no fix listed
- org.springframework:spring-webmvc (Maven): affected from 6.2.0; fixed in 6.2.10
- org.springframework:spring-webmvc (Maven): affected from 6.2.0; fixed in 6.2.10

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-41242/ (Markdown: https://insights.sbomify.com/CVE-2025-41242/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-41242
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-41242
- OSV: https://osv.dev/vulnerability/CVE-2025-41242

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-41242/
Summaries are generated and may contain mistakes; the official description above is the record.
