AploSec / Disclosures / CVE-2026-110634
git-diff before 2.0.7 OS Command Injection via gitDiff Input Strings
CVE-2026-110634 · published 2026-10-14
Summary
git-diff before 2.0.7 contains an OS command injection vulnerability that allows attackers to execute shell commands by supplying crafted strings to the gitDiff API. Attackers who control a diffed document string can embed $(cmd) or backtick substitutions that shelljs.exec evaluates, running commands with Node.js process privileges.
Evidence
The maintainer accepted the patch submitted with the report and merged the fix.
Remediation
Upgrade git-diff to 2.0.7 or later.
References
- VulnCheck advisoryhttps://www.vulncheck.com/advisories/git-diff-before-2.0.7-os-command-injection-via-gitdiff-input-strings
- Fix pull requesthttps://github.com/danday74/git-diff/pull/16
- Vulnerable codehttps://github.com/danday74/git-diff/blob/a85a649badc4c6bba991e87e82382b7d3cdd6634/js/gitDiffReal/generateDiff/index.js#L26-L30
- CVE recordhttps://www.cve.org/CVERecord?id=CVE-2026-110634
- Package
- git-diff
- Ecosystem
- npm
- Weekly downloads
- 585k
- Affected
- < 2.0.7
- Fixed
- 2.0.7
- Weakness
- CWE-78
- CNA
- VulnCheck
- Credit
- Zachariah Mithani