CVE-2018-1002207: Arbitrary File Write via Archive Extraction in mholt/archiver
5.5
CVSS Score
3.0
Basic Information
CVE ID
GHSA ID
EPSS Score
0.89117%
CWE
Published
2/15/2022
Updated
1/11/2023
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
github.com/mholt/archiver | go | < 2.1.0 | 2.1.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from missing path sanitization in archive extraction handlers. The pre-patch code in rar.go
, tar.go
, and zip.js
directly concatenated user-controlled filenames (header.Name/zf.Name) with the target directory without validating the resolved path. The commit introduced sanitizeExtractPath
to check if the destination path remains nested within the target directory. The affected functions are clearly the extraction handlers in these files, as they lacked this critical check before the patch.