Impact
git-diff before version 2.0.7 contains an OS command injection flaw that allows an attacker who can supply a diff string to embed shell metacharacters such as $(cmd) or backticks. The API calls shelljs.exec to evaluate those characters, causing arbitrary shell commands to run with the Node.js process privileges. This satisfies the CWE‑78 definition of an operating‑system command injection.
Affected Systems
The vulnerability affects the danday74:git-diff project, specifically the git‑diff‑apply component. Any installation of git-diff with a version older than 2.0.7 is impacted. Upgrading to 2.0.7 or later removes the flaw.
Risk and Exploitability
The CVSS score of 9.3 indicates critical severity. The EPSS score of 2% shows a moderate probability of exploitation, and the issue is not listed in CISA’s KEV catalog. The likely attack vector requires an attacker to supply a crafted diff string to the gitDiff API; successful exploitation would lead to arbitrary code execution with the privileges of the Node.js process.
OpenCVE Enrichment