CVE-2021-26541: Command injection in gitlog
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.92636%
CWE
Published
4/13/2021
Updated
2/1/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 |
---|---|---|---|
gitlog | npm | < 4.0.4 | 4.0.4 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability was patched by replacing exec
/execSync
with execFile
/execFileSync
which properly handle arguments. The original functions constructed command strings by concatenating user inputs without proper sanitization, allowing shell metacharacter injection. The commit diff shows direct replacement of these functions as the fix mechanism.