CVE-2019-10776:
OS command injection in git-diff-apply
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.41999%
CWE
Published
2/14/2020
Updated
1/9/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 |
---|---|---|---|
git-diff-apply | npm | <= 0.22.1 | 0.22.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability occurs at line 240 (original line 225 in pre-patch code) where utils.run()
executes a template string containing user-controlled remoteUrl
. The commit 106d61d fixes this by switching to runWithSpawn
with argument array formatting, confirming the original code used unsafe shell command construction. The main exported function in index.js is responsible for handling the git operations and contains the vulnerable command execution path.