CVE-2020-36560: go-unzip vulnerable to Path Traversal
9.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.38947%
CWE
Published
12/28/2022
Updated
8/28/2023
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| github.com/artdarek/go-unzip | go | < 2.0.0 | 2.0.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the Extract method in unzip.go which handled zip entry names without adequate path validation. The GitHub patch adds a critical path sanitization check (strings.HasPrefix) to this exact function, confirming it was the vulnerable point. The CVE description and Go vulnerability report (GO-2020-0034) explicitly reference this function as the affected component. The pre-patch code joined user-controlled filenames with the target directory without verifying if the resulting path remained within the designated directory boundary.