CVE-2024-38816
Path traversal vulnerability in functional web frameworks
Description
Applications serving static resources through the functional web frameworks WebMvc.fn or WebFlux.fn are vulnerable to path traversal attacks. An attacker can craft malicious HTTP requests and obtain any file on the file system that is also accessible to the process in which the Spring application is running.
Specifically, an application is vulnerable when both of the following are true:
- the web application uses RouterFunctions to serve static resources
- resource handling is explicitly configured with a FileSystemResource location
However, malicious requests are blocked and rejected when any of the following is true:
- the Spring Security HTTP Firewall https://docs.spring.io/spring-security/reference/servlet/exploits/firewall.html is in use
- the application runs on Tomcat or Jetty
Affected Maven artifacts (2)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.springframework » spring-webflux | >= 5.3.0, <= 5.3.39>= 6.0.0, <= 6.0.23>= 6.1.0, < 6.1.13 | 6.1.13 |
| org.springframework » spring-webmvc | >= 5.3.0, <= 5.3.39>= 6.0.0, <= 6.0.23>= 6.1.0, < 6.1.13 | 6.1.13 |
Blast radius
73% of the dependent artifacts (11,236) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 83,550 |
| 2 hops | 205,046 |
| 3 hops | 190,631 |
| 4 hops | 133,787 |
| 5 hops | 29,327 |
| 6 hops | 6,689 |
Most used dependents
- org.springframework.boot » spring-boot-starter-web19,081 usages
- org.springframework.boot » spring-boot-starter-webflux2,764 usages
- org.springframework.boot » spring-boot-starter-websocket1,319 usages
- com.atlassian.confluence » confluence724 usages
- org.springframework.webflow » spring-webflow716 usages
- com.vaadin » vaadin-core640 usages
- org.redisson » redisson-spring-boot-starter574 usages
- org.openmrs.web » openmrs-web521 usages
- org.apereo.inspektr » inspektr-support-spring515 usages
- org.apereo.cas » cas-server-core-util-api492 usages
- org.apereo.cas » cas-server-core-configuration-api442 usages
- org.apereo.cas » cas-server-core-authentication-api400 usages
- com.vaadin » vaadin378 usages
- org.springframework.boot » spring-boot-starter-data-rest350 usages
- org.springframework.cloud » spring-cloud-starter-gateway325 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-2024-38816 | nvd.nist.gov |
| Package | spring-projects/spring-framework | github.com |
| Web | spring-projects/spring-framework commit d86bf8b | github.com |
| Web | advisory/ntap-20241227-0001 | security.netapp.com |
| Web | security/cve-2024-38816 | spring.io |
