CVE-2021-26543: Command injection in git-parse
8.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.88511%
CWE
Published
2/10/2022
Updated
1/27/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
git-parse | npm | < 1.0.5 | 1.0.5 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
- Multiple advisories explicitly name 'gitDiff' as the vulnerable function.
- The function's documented behavior (accepting commit hashes and file paths for diff operations) aligns with command injection patterns.
- The CWE-74 classification indicates improper neutralization of output used in downstream commands, consistent with shell command injection via string interpolation.
- The patch in version 1.0.5 likely added input sanitization or switched to safer command execution methods.