{"id":"CVE-2026-110634","kind":"vulnerability","aliases":["CVE-2026-110634","GHSA-6wfj-92cw-88vg"],"related":[],"title":"git-diff: OS command injection vulnerability via crafted strings to the gitDiff API","description":"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.","summary":"The npm package git-diff before 2.0.7 passes input strings to a shell through shelljs.exec without escaping them. An attacker who controls a diffed string can embed $(cmd) or backtick substitutions and run commands with the Node.js process privileges.","severity":"critical","cvss":9.8,"epss":0.02348,"exploited":false,"exploited_at":null,"products":[{"name":"git-diff","fixed":["2.0.7"],"affected":"< 2.0.7","ecosystem":"npm"}],"ecosystems":["npm"],"tags":["cwe-78","git-diff","node.js","npm","package"],"not_affected_if":["no-untrusted-input","package-not-installed","version-2.0.7-or-later"],"how_to_check":"- Run `npm ls git-diff` in each project to see whether the package is installed and which version resolves.\n- Check `package-lock.json` or `yarn.lock` for `git-diff` entries below `2.0.7`.\n- Search code for calls to `gitDiff` where the input can come from users or external documents.","fix":"- Upgrade `git-diff` to `2.0.7` or later.\n- Until upgraded, do not pass untrusted user or document strings into `gitDiff`.","status":"open","published_at":"2026-10-14T15:17:16+00:00","first_seen_at":"2026-10-27T16:10:07+00:00","triaged_at":"2026-10-27T16:10:54+00:00","updated_at":"2026-10-27T16:33:08+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-10-27T16:10:54Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade `git-diff` to `2.0.7` or later.\n- Until upgraded, do not pass untrusted user or document strings into `gitDiff`.","reach":"unknown","title":"git-diff npm package: crafted strings run shell commands via gitDiff","impact":"high","summary":"The npm package git-diff before 2.0.7 passes input strings to a shell through shelljs.exec without escaping them. An attacker who controls a diffed string can embed $(cmd) or backtick substitutions and run commands with the Node.js process privileges.","category":"package","nicknames":[],"who_cares":["node.js","npm","git-diff"],"confidence":0.8,"needs_auth":"unknown","worst_case":"Attacker runs arbitrary shell commands with Node.js process privileges on the server","analyst_note":"","how_to_check":"- Run `npm ls git-diff` in each project to see whether the package is installed and which version resolves.\n- Check `package-lock.json` or `yarn.lock` for `git-diff` entries below `2.0.7`.\n- Search code for calls to `gitDiff` where the input can come from users or external documents.","needs_analyst":false,"not_affected_if":["package-not-installed","version-2.0.7-or-later","no-untrusted-input"],"who_is_affected":"Applications that import git-diff and call its gitDiff API with strings an outside party can influence, such as user-submitted or uploaded document content. Projects that only diff trusted, internally generated text are exposed far less, and teams that do not depend on the package can skip it.","user_interaction":"no","needs_special_setup":"no","severity_if_unknown":"critical"},"cost_usd":0.000623,"input_tokens":3375,"output_tokens":571,"severity_before":"critical"},"analyst_status":null,"analyst_note":null,"search":"'-110634':17A,25A '-2026':16A,24A '-78':30B '2.0.7':44B,81C '6wfj':20A '88vg':22A '92cw':21A 'allow':89C 'api':14A,102C 'attack':57B,90C,103C 'backtick':67B,114C 'cmd':65B,112C 'command':5A,71B,85C,94C,120C 'contain':82C 'control':59B,105C 'craft':9A,97C 'cve':15A,23A 'cwe':29B 'dif':61B,107C 'diff':3A,28A,33B,42B,79C 'document':108C 'emb':64B,111C 'escap':54B 'evalu':118C 'execut':92C 'ghsa':19A 'ghsa-6wfj-92cw-88vg':18A 'git':2A,27A,32B,41B,78C 'git-diff':1A,26A,31B,40B,77C 'gitdiff':13A,101C 'inject':6A,86C 'input':46B 'node.js':34B,74B,122C 'npm':35B,38B 'os':4A,84C 'packag':36B,39B 'pass':45B 'privileg':76B,124C 'process':75B,123C 'run':70B,119C 'shell':50B,93C 'shelljs.exec':52B,117C 'string':10A,47B,62B,98C,109C 'substitut':68B,115C 'suppli':96C 'via':8A 'vulner':7A,87C 'without':53B","nicknames":[],"mitigations":[],"who_affected":"Applications that import git-diff and call its gitDiff API with strings an outside party can influence, such as user-submitted or uploaded document content. Projects that only diff trusted, internally generated text are exposed far less, and teams that do not depend on the package can skip it.","tier":"B","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-14T15:17:16+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-6wfj-92cw-88vg","url":"https://github.com/advisories/GHSA-6wfj-92cw-88vg","severity":"critical","published_at":"2026-10-14T15:32:27+00:00","modified_at":"2026-10-27T16:09:36+00:00","first_seen_at":"2026-10-27T16:10:07+00:00","fetched_at":"2026-10-27T16:10:07+00:00","note":null},{"source":"nvd","external_id":"CVE-2026-110634","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-110634","severity":null,"published_at":"2026-10-14T15:17:16+00:00","modified_at":"2026-10-16T19:18:44+00:00","first_seen_at":"2026-10-27T16:33:08+00:00","fetched_at":"2026-10-27T16:33:08+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}