CVE-2020-7668 Arbitrary File Write via Archive Extraction (Zip Slip)
Attackers can write arbitrary files system-wide via malicious zip archives due to insecure path handling in the Go tz 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-7668?
CVE-2020-7668 is a high-severity path traversal vulnerability in github.com/unknwon/cae/tz, 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/tz, 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-7668?
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 Tz Project Compression and Archive Extensions Tz Project.
How do I fix CVE-2020-7668?
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-7668 being exploited?
There is no known exploitation of CVE-2020-7668 in the wild and no public exploit code.
Sources
Also known as GHSA-88jf-7rch-32qc, GO-2020-0041, UBUNTU-CVE-2020-7668.