CVE-2020-7666 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, impacting applications using the u-root cpio package.

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-7666?

CVE-2020-7666 is a high-severity path traversal vulnerability in github.com/u-root/u-root/pkg/cpio, published on 1 Sep 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

This affects all versions of package github.com/u-root/u-root/pkg/cpio. It is vulnerable to leading, non-leading relative path traversal attacks and symlink based (relative and absolute) path traversal attacks in cpio file extraction.

Weakness: CWE-22

Which versions are affected by CVE-2020-7666?

2 open source packages ship an affected version, including github.com/u-root/u-root/pkg/cpio. It affects 1 product.

PackageAffectedFixed in
github.com/u-root/u-root/pkg/cpio GoAll versions to 7.0.0None
github.com/u-root/u-root/pkg/cpio GoAll versions to 7.0.0None

Products include U-Root U-Root.

How do I fix CVE-2020-7666?

Upgrade to a fixed version.

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

Is CVE-2020-7666 being exploited?

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

Sources

Also known as GHSA-mq35-x99r-54fc, MINI-pgqf-hqmc-v84v, MINI-rffj-46fj-52cq, MINI-vr26-q467-h9vh.

Is CVE-2020-7666 in your software?

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

Check your SBOMs for free