CVE-2020-5280 Local file inclusion vulnerability in http4s

High 7.6 Published Updated

An attacker can read files outside the configured directory via path traversal in http4s static content services.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2020-5280?

CVE-2020-5280 is a high-severity path traversal vulnerability in http4s, published on 25 Mar 2020. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

http4s before versions 0.18.26, 0.20.20, and 0.21.2 has a local file inclusion vulnerability. This vulnerability applies to all users of org.http4s.server.staticcontent.FileService, org.http4s.server.staticcontent.ResourceService and org.http4s.server.staticcontent.WebjarService. URI normalization is applied incorrectly. Requests whose path info contain ../ or // can expose resources outside of the configured location. This issue is patched in versions 0.18.26, 0.20.20, and 0.21.2. Note that 0.19.0 is a deprecated release and has never been supported.

Weakness: CWE-22, CWE-23

Which versions are affected by CVE-2020-5280?

6 open source packages ship an affected version, including org.http4s:http4s-server_2.12. It affects 1 product.

PackageAffectedFixed in
org.http4s:http4s-server_2.12 MavenAll versions0.18.26
org.http4s:http4s-server_2.12 MavenAll versions0.18.26
org.http4s:http4s-server_2.12 MavenFrom 0.19.00.20.20
org.http4s:http4s-server_2.12 MavenFrom 0.19.00.20.20
org.http4s:http4s-server_2.12 MavenFrom 0.21.00.21.2
org.http4s:http4s-server_2.12 MavenFrom 0.21.00.21.2

Products include Typelevel Http4s.

How do I fix CVE-2020-5280?

Upgrade org.http4s:http4s-server_2.12 to a fixed version for your release line: 0.18.26, 0.20.20 or 0.21.2.

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

Is CVE-2020-5280 being exploited?

There is no known exploitation of CVE-2020-5280 in the wild and no public exploit code.

Sources

Also known as GHSA-66q9-f7ff-mmx6.

Is CVE-2020-5280 in your software?

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

Check your SBOMs for free