CVE-2022-21186: @acrontum/filesystem-template vulnerable to Command Injection due to fetchRepo API missing sanitization
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.96214%
CWE
Published
8/6/2022
Updated
8/17/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
@acrontum/filesystem-template | npm | < 0.0.2 | 0.0.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the fetchRepo function's handling of the URL parameter. The patch removed the URL parameter entirely (changed from fetchRepo(url, cacheInfo, options) to fetchRepo(cacheInfo, options)), indicating the URL's href field was the injection vector. Pre-patch, attackers could supply a crafted href value (e.g., '|touch /tmp/rce') that would be executed during repository cloning. The CWE-77 classification and Snyk's PoC confirm command injection via unsanitized URL input in this function.