CVE-2025-41234
Spring Framework vulnerable to a reflected file download (RFD)
Description
Description
In Spring Framework, versions 6.0.x as of 6.0.5, versions 6.1.x and 6.2.x, an application is vulnerable to a reflected file download (RFD) attack when it sets a “Content-Disposition” header with a non-ASCII charset, where the filename attribute is derived from user-supplied input.
Specifically, an application is vulnerable when all the following are true:
- The header is prepared with
org.springframework.http.ContentDisposition. - The filename is set via
ContentDisposition.Builder#filename(String, Charset). - The value for the filename is derived from user-supplied input.
- The application does not sanitize the user-supplied input.
- The downloaded content of the response is injected with malicious commands by the attacker (see RFD paper reference for details).
An application is not vulnerable if any of the following is true:
- The application does not set a “Content-Disposition” response header.
- The header is not prepared with
org.springframework.http.ContentDisposition. - The filename is set via one of:
ContentDisposition.Builder#filename(String), orContentDisposition.Builder#filename(String, ASCII)
- The filename is not derived from user-supplied input.
- The filename is derived from user-supplied input but sanitized by the application.
- The attacker cannot inject malicious content in the downloaded content of the response.
Affected Spring Products and VersionsSpring Framework
- 6.2.0 - 6.2.7
- 6.1.0 - 6.1.20
- 6.0.5 - 6.0.28
- Older, unsupported versions are not affected
Mitigation
Users of affected versions should upgrade to the corresponding fixed version.
| Affected version(s) | Fix version | Availability | | - | - | - | | 6.2.x | 6.2.8 | OSS | | 6.1.x | 6.1.21 | OSS | | 6.0.x | 6.0.29 | Commercial |
No further mitigation steps are necessary.
Affected Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.springframework » spring-web | >= 6.0.5, <= 6.0.23>= 6.1.0, < 6.1.21>= 6.2.0, < 6.2.8 | 6.1.21, 6.2.8 |
Blast radius
55% of the dependent artifacts (6,730) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 36,784 |
| 2 hops | 101,848 |
| 3 hops | 96,523 |
| 4 hops | 38,752 |
| 5 hops | 5,745 |
| 6 hops | 1,402 |
Most used dependents
- org.springframework.boot » spring-boot-starter-web19,081 usages
- org.springframework » spring-webmvc7,538 usages
- org.springframework.boot » spring-boot-starter-security3,606 usages
- org.springframework.boot » spring-boot-starter-webflux2,764 usages
- org.springframework.security » spring-security-web2,133 usages
- org.springframework.cloud » spring-cloud-starter-openfeign1,389 usages
- org.springframework.boot » spring-boot-starter-websocket1,319 usages
- org.springframework.security » spring-security-test1,308 usages
- org.springframework » spring-webflux1,283 usages
- org.jenkins-ci.main » jenkins-core1,191 usages
- org.springframework.cloud » spring-cloud-starter-config978 usages
- org.springframework.boot » spring-boot-starter-json743 usages
- org.springframework.webflow » spring-webflow716 usages
- com.vaadin » vaadin-core640 usages
- com.vaadin » vaadin-maven-plugin600 usages
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
| Advisory | NVD CVE-2025-41234 | nvd.nist.gov |
| Package | spring-projects/spring-framework | github.com |
| Web | spring-projects/spring-framework issue #35034 | github.com |
| Web | spring-projects/spring-framework commit f0e7b42 | github.com |
| Web | security/cve-2025-41234 | spring.io |
