CVE-2022-24376: OS Command Injection in git-promise
7.2
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.91994%
CWE
Published
6/11/2022
Updated
2/1/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
git-promise | npm | <= 1.0.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from how user-supplied git commands are processed:
- The prior fix (PR #8) attempted to mitigate command injection by switching from shell.exec to execFile with argument splitting
- The argument splitting uses split(/\s+/) which fails to account for:
- Tab characters as argument separators (\t)
- Shell variable substitution (${IFS})
- The package maintainer confirmed the vulnerability through README warnings demonstrating these injection vectors
- The execution flow (git() -> parse command -> execFile) remains vulnerable as no additional validation/sanitization was implemented
- CWE mappings (77/88) directly correlate to improper command argument neutralization in this function