CVE-2023-28105: Go-huge-util vulnerable to path traversal when unzipping files
8.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.26217%
CWE
Published
3/16/2023
Updated
10/2/2023
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:L
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
github.com/dablelv/go-huge-util | go | < 0.0.34 | 0.0.34 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the unzipFile
function's handling of zip entry names. The pre-patch code directly joined 'dstDir' and 'file.Name' (path.Join(dstDir, file.Name)), which could contain path traversal sequences. The fix introduced path sanitization via filepath.Join
and strings.TrimPrefix
to neutralize traversal attempts. Since the commit diff explicitly modifies this function to address the path traversal, and the CVE/GHSA both reference zip.Unzip
(which calls unzipFile
), this is the definitive vulnerable function.