CVE-2024-38816 is a high-severity (CVSS 7.5) Path Traversal vulnerability in org.springframework:spring-webmvc. 3 public exploit or proof-of-concept references are indexed, so weaponization risk is real. A fix is available for org.springframework:spring-webmvc — see the affected versions and patch details below.
Path traversal vulnerability in functional web frameworks
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2024-38816.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
org.springframework:spring-webmvc☕org.springframework:spring-webflux☕org.springframework:spring-webmvc☕org.springframework:spring-webflux☕org.springframework:spring-webmvc☕org.springframework:spring-webfluxReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
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 Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.springframework:spring-webmvc | ≥ 6.1.0&&< 6.1.13 | 6.1.13org.springframework:spring-webmvc:6.1.13 |
| ☕Maven | org.springframework:spring-webflux | ≥ 6.1.0&&< 6.1.13 | 6.1.13org.springframework:spring-webflux:6.1.13 |
| ☕Maven | org.springframework:spring-webmvc | ≥ 6.0.0 | No fix |
| ☕Maven | org.springframework:spring-webflux | ≥ 6.0.0 | No fix |
| ☕Maven | org.springframework:spring-webmvc | ≥ 5.3.0 | No fix |
| ☕Maven | org.springframework:spring-webflux | ≥ 5.3.0 | No fix |
Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.springframework:spring-webmvc, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.springframework:spring-webmvc to 6.1.13 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2024-38816 is resolved across your whole dependency graph.
Workarounds
Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.
How to detect CVE-2024-38816
A community-maintained Nuclei template exists for this CVE. You can scan for it directly:
nuclei -id cve-2024-38816 -u https://target- Template
- WebMvc.fn/WebFlux.fn - Path Traversal
- Severity
- high
- Impact
- Unauthenticated attackers can exploit path traversal to read any file accessible to the Spring application process, potentially exposing sensitive configuration files, credentials, and application data.
- Remediation
- Upgrade to Spring Framework versions that address this path traversal vulnerability or disable static resource serving through functional web frameworks.
Template by ProjectDiscovery nuclei-templates (pussycat0x), MIT licensed. View the full template. Scan only systems you are authorised to test.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Path traversal vulnerabilities in applications that serve static resources via RouterFunctions and FileSystemResource pose a important security risk, as they allow attackers to bypass access controls and retrieve arbitrary files from the server's filesystem. This type of attack can lead to unauthorized exposure of…
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.Source: Red Hat security advisory for CVE-2024-38816 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| HawtIO 4.0.0 for Red Hat build of Apache Camel 4 | spring-webmvc | RHSA-2024:11023 |
| Red Hat build of Apache Camel 4.4.3 for Spring Boot | spring-webmvc | RHSA-2024:8064 |
Frequently Asked Questions
Is CVE-2024-38816 in your dependencies?
Find it across Maven, including transitive dependencies.