CVE-2020-7666: github.com/u-root/u-root/pkg/cpio Arbitrary File Write via Archive Extraction (Zip Slip)
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.65494%
CWE
Published
4/24/2024
Updated
4/24/2024
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:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| github.com/u-root/u-root/pkg/cpio | go | <= 7.0.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper path sanitization during CPIO extraction. The pull request #1817 shows the fix involved changing path construction from filepath.Join(base, file) to a safer filepath.Join(base, filepath.Join("/", file)) pattern. This indicates CreateFile was the primary function handling file creation with unsafe path handling. The Snyk PoC demonstrates exploitation through archive processing via cpio.CreateFile, confirming this function's role in the vulnerability.