Skip to main content

git-diff EUVDEUVD-2026-101262

| CVE-2026-110634 CRITICAL
OS Command Injection (CWE-78)
2026-10-14 VulnCheck GHSA-6wfj-92cw-88vg
9.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Supply crafted string to gitDiff API
  2. Exploit
    Embed $(cmd) or backtick substitution
  3. Execution
    shelljs.exec evaluates payload in shell
  4. Impact
    Execute arbitrary OS commands as Node.js process

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK

2 techniques across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires an application that passes attacker-controllable document strings into git-diff's gitDiff API (versions before 2.0.7, which hash inputs via a shell printf ... | git hash-object command executed by shelljs.exec). The payload must contain shell command-substitution syntax ($(...) or backticks), which survives JSON.stringify escaping and is evaluated by the shell. The key limiting factor is deployment context: exploitation is only reachable if untrusted input flows into the diffed strings - applications that diff only trusted/internal content are not exposed. Resulting commands run with the privileges of the Node.js process, so impact scales with how that process is privileged and sandboxed.

Impact

The CVSS 4.0 base score of 9.3 (Critical) reflects a maximal-impact OS command injection: network vector, low complexity, no privileges, no user interaction, with high confidentiality, integrity and availability impact to the vulnerable system (AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H). However, this is a design-level caveat rather than a universally remote bug: git-diff is a library, and the 'network/unauthenticated' characterization only holds when the consuming application forwards attacker-controlled document strings into the gitDiff API. Where the diffed strings are internal/trusted, real exposure drops sharply. No EPSS score and no KEV status were provided in the input, so exploitation probability and active-exploitation signals cannot be assessed - their absence is not evidence of low risk, but it means there is no public-exploitation data point to corroborate the high CVSS. No public exploit code was identified; the only public artifact is the vendor fix (PR #16 / commit bfd727b) which clearly reveals the vulnerable shell-interpolation pattern and thus lowers the effort to weaponize. Net assessment: a genuinely high-severity, easily-understood injection flaw, but real-world priority is gated by how widely the small git-diff package is deployed and whether applications expose its input to untrusted data - treat as high priority for any service that diffs user-supplied content, lower for internal tooling.

Exploit ScenarioDerived

An application that diffs user-submitted documents calls git-diff's gitDiff API with an attacker-controlled string such as 'hello $(id > /tmp/pwned)'. Because the pre-2.0.7 code interpolates the string into a printf "..." | git hash-object shell command and runs it through shelljs.exec, the $(...) substitution is evaluated by the shell, executing arbitrary OS commands with the Node.js process's privileges. No public exploit code is identified, but the vendor's patch commit discloses the exact vulnerable code path.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 2.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 14, 2026

OS command injection in the npm package git-diff (danday74/git-diff) before 2.0.7 lets unauthenticated attackers execute arbitrary shell commands with the privileges of the Node.js process by passing crafted document strings into the gitDiff API. The library hashed each input with a shell command of the form printf "..." | git hash-object -w --stdin evaluated through shelljs.exec, so payloads containing $(cmd) or backtick substitutions survived the JSON.stringify escaping and were executed. The vendor has published an upstream fix that removes the shell invocation entirely, and no public exploit code has been identified at time of analysis; the assessed CVSS 4.0 base score is 9.3 (Critical) for maximal confidentiality, integrity and availability impact to the vulnerable system.

RemediationAI

Upgrade git-diff to 2.0.7 or later, which the advisory identifies as the first non-vulnerable release; if a tagged 2.0.7 artifact is not yet available in your registry mirror, apply the upstream fix directly - the change is in https://github.com/danday74/git-diff/pull/16 with the exact patch commit at https://github.com/danday74/git-diff/commit/bfd727b6cf1daa671c3528d1d681f55b70e8fb19, and it swaps shelljs.exec for child_process.execFileSync with the untrusted strings passed via stdin so no shell is involved. Note the caveat that the patch references are a GitHub PR/commit, so confirm the published package version you install actually contains it before considering the issue closed. If you cannot upgrade immediately, stop passing untrusted or externally sourced content into the gitDiff API at all - this is the only fully reliable workaround, since input filters that strip $(...) and backticks are trivially bypassable with encoding or alternate substitution forms and will also corrupt legitimate diff content. As a compensating control, run the Node.js process that performs diffs under a restricted, unprivileged account with a read-only container filesystem and no network egress, and drop spawn/exec capability from its seccomp or AppArmor profile; the trade-off is that these controls limit blast radius but do not remove the injection itself.

Affected VersionsENISA

git-diff 0 <2.0.7

Affected Packages

euvd git_diff fix: 2.0.7

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

git-diff is a Node.js library that produces a git-style diff between two strings. In versions before 2.0.7 the internal generateDiff routine built two shell command strings by JSON.stringify-ing the caller-supplied strings and interpolating them into printf <json> | git <gitDir> hash-object -w --stdin, which was then run with shelljs.exec. JSON.stringify only escapes quotes and backslashes, so shell command-substitution syntax such as $(cmd) or cmd remained intact inside the double quotes and was interpreted by the shell before git ever received the input. That is a classic CWE-78 OS Command Injection: untrusted data crossing into a shell interpreter without escaping or parameterization. Because the commands are executed as children of the Node.js process, the attacker inherits that process's user, environment and filesystem access. The upstream fix in PR #16 replaces the shell pipeline with child_process.execFileSync('git', ['--git-dir', gitDir, 'hash-object', '-w', '--stdin'], {input: input}), feeding the untrusted value over the child's stdin so no shell parsing occurs; the patch also notes the previous implementation deliberately avoided .. history expansion but did nothing to neutralize command substitution. The affected component is identified by CPE cpe:2.3:a:danday74:git-diff:*:*:*:*:*:*:*:* (all versions before 2.0.7).

Know when Node.js gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 9.3 CRITICAL
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 9.8 CRITICAL

Attacker-controlled input to the API yields shell command execution with no auth or interaction (AV:N/AC:L/PR:N/UI:N); code runs within the Node process so S:U; full C/I/A impact.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

A critical OS command injection flaw in the npm package git-diff (danday74/git-diff) before 2.0.7 allows attackers to execute arbitrary shell commands with the privileges of the Node.js process wherever the library is used. Organizations using affected versions in development, CI/CD, or production applications face potential data exposure, service disruption, and full system compromise, making remediation a leadership priority. No public exploit identified at time of analysis, but the vendor has released a fixed version (2.0.7) that removes the vulnerable shell invocation.

Business Impact: Severe
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
2.3%
Top 17% exploitable
Prevalence
Low
niche single-maintainer npm diff utility, limited production footprint
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 2.3%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

48
Low Medium High Critical
KEV: 0
EPSS: +2
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

OS command injection occurs when an application passes unsanitized user input directly into system shell commands.

CVE-2025-68613 HIGH POC
8.8 Dec 19

Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation

CVE-2024-41713 CRITICAL POC
9.1 Oct 21

A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could

CVE-2024-55591 CRITICAL POC
9.8 Jan 14

FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote

CVE-2023-44487 HIGH POC
7.5 Oct 10

Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour

CVE-2014-7205 CRITICAL POC
10.0 Oct 08

Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t

CVE-2025-59528 CRITICAL POC
10.0 Sep 22

Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete

CVE-2017-14849 HIGH POC
7.5 Sep 28

Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc

CVE-2017-5941 CRITICAL POC
9.8 Feb 09

An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2014-3744 HIGH POC
7.5 Oct 23

Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi

CVE-2014-9566 HIGH POC
7.5 Mar 10

Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin

CVE-2013-4660 MEDIUM POC
6.8 Jun 28

The JS-YAML module before 2.0.5 for Node.js parses input without properly considering the unsafe !!js/function tag, whic

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy