# CVE-2024-38819: Spring Framework Path Traversal vulnerability

> Attackers can read arbitrary files on the server via path traversal in Spring functional web frameworks, exposing sensitive data.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/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:** 19 Dec 2024
- **Updated:** 10 Jan 2025
- **Also known as:** CLEANSTART-2026-TE96968, CLSA-2025-1742342444, DEBIAN-CVE-2024-38819, ECHO-9581-aff6-f7db, GHSA-g5vr-rgqm-vf78, ROOT-APP-MAVEN-CVE-2024-38819, UBUNTU-CVE-2024-38819

## What is CVE-2024-38819?

CVE-2024-38819 is a high-severity path traversal vulnerability in Spring Framework, published on 19 Dec 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2024-38819?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.springframework:spring-webflux` | Maven | All versions to 5.3.40 | None |
| `org.springframework:spring-webflux` | Maven | All versions to 5.3.40 | None |
| `org.springframework:spring-webflux` | Maven | From 6.0.0 to 6.0.24 | None |
| `org.springframework:spring-webflux` | Maven | From 6.0.0 to 6.0.24 | None |
| `org.springframework:spring-webflux` | Maven | From 6.1.0 | 6.1.14 |
| `org.springframework:spring-webflux` | Maven | From 6.1.0 | 6.1.14 |
| `org.springframework:spring-webmvc` | Maven | All versions to 5.3.40 | None |
| `org.springframework:spring-webmvc` | Maven | All versions to 5.3.40 | None |
| `org.springframework:spring-webmvc` | Maven | From 6.0.0 to 6.0.24 | None |
| `org.springframework:spring-webmvc` | Maven | From 6.0.0 to 6.0.24 | None |
| `org.springframework:spring-webmvc` | Maven | From 6.1.0 | 6.1.14 |
| `org.springframework:spring-webmvc` | Maven | From 6.1.0 | 6.1.14 |

## How do I fix CVE-2024-38819?

Upgrade org.springframework:spring-webflux to 6.1.14 or later.

## Is CVE-2024-38819 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-38819 exists.

Public exploit code:

- https://github.com/masa42/CVE-2024-38819-POC (github_poc): https://github.com/masa42/CVE-2024-38819-POC
- CVE-2024-38819 nuclei template (github_poc): https://github.com/GhostS3c/CVE-2024-38819
- https://github.com/vishalnoza/CVE-2024-38819-POC2 (github_poc): https://github.com/vishalnoza/CVE-2024-38819-POC2
- https://github.com/skrkcb2/cve-2024-38819 (github_poc): https://github.com/skrkcb2/cve-2024-38819
- https://github.com/trevorputbrese/cve-2024-38819-lab (github_poc): https://github.com/trevorputbrese/cve-2024-38819-lab
- Spring Framework Path Traversal in Functional Web Frameworks (nuclei): http/cves/2024/CVE-2024-38819.yaml

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-38819 and fix it if it is affected.

What it is: CVE-2024-38819 is a high-severity path traversal vulnerability in Spring Framework, published on 19 Dec 2024. 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-2024-38819 exists.

Affected packages and fixed versions:
- org.springframework:spring-webflux (Maven): affected all versions up to 5.3.40; no fix listed
- org.springframework:spring-webflux (Maven): affected all versions up to 5.3.40; no fix listed
- org.springframework:spring-webflux (Maven): affected from 6.0.0 up to 6.0.24; no fix listed
- org.springframework:spring-webflux (Maven): affected from 6.0.0 up to 6.0.24; no fix listed
- org.springframework:spring-webflux (Maven): affected from 6.1.0; fixed in 6.1.14
- org.springframework:spring-webflux (Maven): affected from 6.1.0; fixed in 6.1.14
- org.springframework:spring-webmvc (Maven): affected all versions up to 5.3.40; no fix listed
- org.springframework:spring-webmvc (Maven): affected all versions up to 5.3.40; no fix listed
- org.springframework:spring-webmvc (Maven): affected from 6.0.0 up to 6.0.24; no fix listed
- org.springframework:spring-webmvc (Maven): affected from 6.0.0 up to 6.0.24; no fix listed
- org.springframework:spring-webmvc (Maven): affected from 6.1.0; fixed in 6.1.14
- org.springframework:spring-webmvc (Maven): affected from 6.1.0; fixed in 6.1.14

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-2024-38819/ (Markdown: https://insights.sbomify.com/CVE-2024-38819/index.md)
```

## Sources

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

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