# CVE-2026-110634: git-diff before 2.0.7 OS Command Injection via gitDiff Input Strings

Source: https://aplosec.si/cve/CVE-2026-110634/

[AploSec](https://aplosec.si/) / [Disclosures](https://aplosec.si/disclosures/) / CVE-2026-110634

Critical 9.3 · Fix merged · Fixed in 2.0.7 · CWE-78 · npm

# git-diff before 2.0.7 OS Command Injection via gitDiff Input Strings

CVE-2026-110634 · published 2026-10-14

In plain words: this type of bug lets someone run their own commands on the server (command injection). A fixed release is listed.

## Summary

CVE-2026-110634 affects git-diff (npm) < 2.0.7: Command injection via gitDiff Input Strings (CWE-78). Fixed in 2.0.7. CVSS 4.0 base score 9.3 (Critical), assigned by VulnCheck. Published 2026-10-14 by VulnCheck. Credit: Zachariah Mithani.

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. Releases in the affected range (< 2.0.7) are vulnerable. See the linked advisory for details on affected release lines.

## Timeline

- 2026-10-14 CVE published

- 2026-10-28 Public record last updated

## References

- [VulnCheck advisoryhttps://www.vulncheck.com/advisories/git-diff-before-2.0.7-os-command-injection-via-gitdiff-input-strings](https://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](https://github.com/danday74/git-diff/pull/16)

- [Vulnerable codehttps://github.com/danday74/git-diff/blob/a85a649badc4c6bba991e87e82382b7d3cdd6634/js/gitDiffReal/generateDiff/index.js#L26-L30](https://github.com/danday74/git-diff/blob/a85a649badc4c6bba991e87e82382b7d3cdd6634/js/gitDiffReal/generateDiff/index.js#L26-L30)

- [CVE recordhttps://www.cve.org/CVERecord?id=CVE-2026-110634](https://www.cve.org/CVERecord?id=CVE-2026-110634)

- [NVD recordhttps://nvd.nist.gov/vuln/detail/CVE-2026-110634](https://nvd.nist.gov/vuln/detail/CVE-2026-110634)

- [Fix commithttps://github.com/danday74/git-diff/commit/bfd727b6cf1daa671c3528d1d681f55b70e8fb19](https://github.com/danday74/git-diff/commit/bfd727b6cf1daa671c3528d1d681f55b70e8fb19)

**Severity:** Critical 9.3 CVSS 4.0, scored by VulnCheck in the [CVE record](https://www.cve.org/CVERecord?id=CVE-2026-110634)

**Package:** git-diff

**Ecosystem:** npm

**Affected:** < 2.0.7

**Fixed:** 2.0.7

**Weakness:** CWE-78

**CNA:** VulnCheck

**Credit:** Zachariah Mithani finder
