CVE-2020-36566 Path traversal in github.com/whyrusleeping/tar-utils
Attackers can write or overwrite files outside the target directory via malicious archives, affecting applications using this Go 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-36566?
CVE-2020-36566 is a critical path traversal vulnerability in github.com/whyrusleeping/tar-utils, published on 27 Dec 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Due to improper path sanitization, archives containing relative file paths can cause files to be written (or overwritten) outside of the target directory.
Weakness: CWE-22
Which versions are affected by CVE-2020-36566?
3 open source packages ship an affected version, including github.com/whyrusleeping/tar-utils. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
github.com/whyrusleeping/tar-utils Go | All versions | 0.0.0-20201201191210-20a61371de5b |
github.com/whyrusleeping/tar-utils Go | All versions | 0.0.0-20201201191210-20a61371de5b |
github.com/whyrusleeping/tar-utils Go | All versions | 0.0.0-20201201191210-20a61371de5b |
Products include Tar-Utils Project Tar-Utils.
How do I fix CVE-2020-36566?
Upgrade github.com/whyrusleeping/tar-utils to 0.0.0-20201201191210-20a61371de5b or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2020-36566 being exploited?
There is no known exploitation of CVE-2020-36566 in the wild and no public exploit code.
Sources
Also known as GHSA-jpf8-h7h7-3ppm, GO-2021-0106.