CVE-2020-5405 Directory Traversal with spring-cloud-config-server

Medium 6.5 Published Updated

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

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

What is CVE-2020-5405?

CVE-2020-5405 is a medium-severity path traversal vulnerability in Spring Cloud Config, published on 5 Mar 2020. 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.2.x prior to 2.2.2, versions 2.1.x prior to 2.1.7, 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, CWE-23

Which versions are affected by CVE-2020-5405?

4 open source packages ship an affected version, including org.springframework.cloud:spring-cloud-config-server. It affects 1 product.

PackageAffectedFixed in
org.springframework.cloud:spring-cloud-config-server MavenFrom 2.1.02.1.7
org.springframework.cloud:spring-cloud-config-server MavenFrom 2.1.02.1.7
org.springframework.cloud:spring-cloud-config-server MavenFrom 2.2.02.2.2
org.springframework.cloud:spring-cloud-config-server MavenFrom 2.2.02.2.2

Products include Vmware Spring Cloud Config.

How do I fix CVE-2020-5405?

Upgrade org.springframework.cloud:spring-cloud-config-server to a fixed version for your release line: 2.1.7 or 2.2.2.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2020-5405 being exploited?

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

Public exploit code: 1 Nuclei template and 1 proofs of concept on GitHub.

Sources

Also known as GHSA-g86w-v5vg-9gxf.

Is CVE-2020-5405 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free