CVE-2020-7667 Arbitrary File Write via Archive Extraction (Zip Slip)

High 7.5 Published Updated

Attackers can write arbitrary files outside the intended directory via malicious CPIO archives in the go-rpmutils library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2020-7667?

CVE-2020-7667 is a high-severity path traversal vulnerability in github.com/sassoftware/go-rpmutils/cpio, published on 24 Jun 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

In package github.com/sassoftware/go-rpmutils/cpio before version 0.1.0, the CPIO extraction functionality doesn't sanitize the paths of the archived files for leading and non-leading ".." which leads in file extraction outside of the current directory. Note: the fixing commit was applied to all affected versions which were re-released.

Weakness: CWE-22

Which versions are affected by CVE-2020-7667?

3 open source packages ship an affected version, including github.com/sassoftware/go-rpmutils. It affects 1 product.

PackageAffectedFixed in
github.com/sassoftware/go-rpmutils GoAll versions0.1.0
github.com/sassoftware/go-rpmutils GoAll versions0.1.0
github.com/sassoftware/go-rpmutils GoAll versions0.1.0

Products include Sas Go Rpm Utils.

How do I fix CVE-2020-7667?

Upgrade github.com/sassoftware/go-rpmutils to 0.1.0 or later.

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

Is CVE-2020-7667 being exploited?

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

Sources

Also known as GHSA-9423-6c93-gpp8, GO-2020-0042, SNYK-GOLANG-GITHUBCOMSASSOFTWAREGORPMUTILSCPIO-570427.

Is CVE-2020-7667 in your software?

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

Check your SBOMs for free