# CVE-2019-3799: Directory Traversal with spring-cloud-config-server

> Attackers can read arbitrary configuration files via directory traversal in Spring Cloud Config Server, exposing sensitive data.

- **Severity:** Medium 6.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/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:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 6 May 2019
- **Updated:** 17 Sep 2024
- **Also known as:** GHSA-4x49-w62v-76q7

## What is CVE-2019-3799?

CVE-2019-3799 is a medium-severity path traversal vulnerability in Oracle Communications Cloud Native Core Policy, published on 6 May 2019. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

Spring Cloud Config, versions 2.1.x prior to 2.1.2, versions 2.0.x prior to 2.0.4, and versions 1.4.x prior to 1.4.6, and older unsupported versions allow applications to serve arbitrary configuration files through the spring-cloud-config-server module. A malicious user, or attacker, can send a request using a specially crafted URL that can lead a directory traversal attack.

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

## Which versions are affected by CVE-2019-3799?

6 open source packages ship an affected version, including org.springframework.cloud:spring-cloud-config-server. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.springframework.cloud:spring-cloud-config-server` | Maven | All versions | 1.4.6 |
| `org.springframework.cloud:spring-cloud-config-server` | Maven | All versions | 1.4.6 |
| `org.springframework.cloud:spring-cloud-config-server` | Maven | From 2.0.0 | 2.0.4 |
| `org.springframework.cloud:spring-cloud-config-server` | Maven | From 2.0.0 | 2.0.4 |
| `org.springframework.cloud:spring-cloud-config-server` | Maven | From 2.1.0 | 2.1.2 |
| `org.springframework.cloud:spring-cloud-config-server` | Maven | From 2.1.0 | 2.1.2 |

Products: Oracle Communications Cloud Native Core Policy, Vmware Spring Cloud Config.

## How do I fix CVE-2019-3799?

Upgrade org.springframework.cloud:spring-cloud-config-server to a fixed version for your release line: 1.4.6, 2.0.4 or 2.1.2.

## Is CVE-2019-3799 being exploited?

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

Public exploit code:

- CVE-2019-3799 - Spring Cloud Config Server: Directory Traversal < 2.1.2, 2.0.4, 1.4.6 (github_poc): https://github.com/mpgn/CVE-2019-3799
- Spring Cloud Config Server Directory Traversal (metasploit)
- Spring Cloud Config 2.1.x - Path Traversal (Metasploit) (exploitdb)
- Spring Cloud Config 2.1.x - Path Traversal (Metasploit) (exploitdb)
- Spring Cloud Config CVE-2019-3799|CVE_2020_5410 漏洞检测 (github_poc): https://github.com/Corgizz/SpringCloud
- Spring Cloud Config Server - Local File Inclusion (nuclei): http/cves/2019/CVE-2019-3799.yaml

## Other vulnerabilities in Oracle Communications Cloud Native Core Policy

- [CVE-2021-35574](https://insights.sbomify.com/CVE-2021-35574/): Denial of service in Outside In Technology (high 7.5)
- [CVE-2021-22119](https://insights.sbomify.com/CVE-2021-22119/): Resource Exhaustion in Spring Security (high 7.5)
- [CVE-2021-23440](https://insights.sbomify.com/CVE-2021-23440/): Prototype Pollution (high 7.3)
- [CVE-2021-33880](https://insights.sbomify.com/CVE-2021-33880/): Observable Timing Discrepancy in aaugustin websockets library (medium 5.9)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2019-3799 and fix it if it is affected.

What it is: CVE-2019-3799 is a medium-severity path traversal vulnerability in Oracle Communications Cloud Native Core Policy, published on 6 May 2019. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2019-3799 exists.

Affected packages and fixed versions:
- org.springframework.cloud:spring-cloud-config-server (Maven): affected all versions; fixed in 1.4.6
- org.springframework.cloud:spring-cloud-config-server (Maven): affected all versions; fixed in 1.4.6
- org.springframework.cloud:spring-cloud-config-server (Maven): affected from 2.0.0; fixed in 2.0.4
- org.springframework.cloud:spring-cloud-config-server (Maven): affected from 2.0.0; fixed in 2.0.4
- org.springframework.cloud:spring-cloud-config-server (Maven): affected from 2.1.0; fixed in 2.1.2
- org.springframework.cloud:spring-cloud-config-server (Maven): affected from 2.1.0; fixed in 2.1.2

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

## Sources

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

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