GHSA-6jrj-vc65-c983: unzip-stream allows Arbitrary File Write via artifact extraction
7.5
CVSS Score
3.1
Basic Information
CVE ID
-
GHSA ID
EPSS Score
-
CWE
Published
8/26/2024
Updated
8/26/2024
KEV Status
No
Technology
JavaScript
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 |
|---|---|---|---|
| unzip-stream | npm | < 0.3.2 | 0.3.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from insufficient path sanitization in the _prepareOutStream method. The commit diff shows the critical fix was modifying the path sanitization regex pattern in this function. The original regex (^([/\][.]+[/\]+)[/\]*) only removed leading dot/slash sequences, while the patched regex ((?<=^|[/\]+)[.][.]+(?=[/\]+|$)) specifically targets and replaces parent directory traversal sequences anywhere in the path. This function directly handles path normalization before file extraction, making it the vulnerable entry point.