CVE-2020-7664 Arbitrary File Write via Archive Extraction (Zip Slip)
Attackers can write arbitrary files system-wide via malicious zip archives in the unknwon/cae/zip Go library, potentially leading to code execution.
- 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-7664?
CVE-2020-7664 is a high-severity path traversal vulnerability in github.com/unknwon/cae/zip, published on 17 Jun 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
In all versions of the package github.com/unknwon/cae/zip, the ExtractTo function doesn't securely escape file paths in zip archives which include leading or non-leading "..". This allows an attacker to add or replace files system-wide.
Weakness: CWE-22
Which versions are affected by CVE-2020-7664?
3 open source packages ship an affected version, including github.com/unknwon/cae. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
github.com/unknwon/cae Go | All versions | 1.0.1 |
github.com/unknwon/cae Go | All versions | 1.0.1 |
github.com/unknwon/cae Go | All versions | 1.0.1 |
Products include Compression and Archive Extensions Project Compression and Archive Extensions Zip Project.
How do I fix CVE-2020-7664?
Upgrade github.com/unknwon/cae to 1.0.1 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2020-7664 being exploited?
There is no known exploitation of CVE-2020-7664 in the wild and no public exploit code.
Sources
Also known as GHSA-vpx7-vm66-qx8r, GO-2021-0228, UBUNTU-CVE-2020-7664.