Skip to content
Heist/ feed
Back to feed
CriticalFix available

git-diff: OS command injection vulnerability via crafted strings to the gitDiff API

Type: advisorySources: OSV

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.

Products
git-diff
Affected versions
Not specified
Fixed versions
2.0.7
CVEs
CVE-2026-110634
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 18:46 UTC · Revision 1

Source evidence

git-diff: OS command injection vulnerability via crafted strings to the gitDiff API

core-osv · Original source

Published 14 Oct 2026, 15:32 UTC

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.

osv:GHSA-6wfj-92cw-88vg

git-diff

Fixed versions: 2.0.7

Complete source record
{
  "id": "bd8d99e700cc79557dd3e6ab597670b375a40a3a31b8082ea8200cc66d52c61b",
  "url": "https://osv.dev/vulnerability/GHSA-6wfj-92cw-88vg",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "git-diff: OS command injection vulnerability via crafted strings to the gitDiff API",
    "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": "osv:GHSA-6wfj-92cw-88vg",
    "products": [
      {
        "name": {
          "value": "git-diff",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.0.7",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "critical",
    "structured": {
      "id": "GHSA-6wfj-92cw-88vg",
      "aliases": [
        "CVE-2026-110634",
        "GHSA-6wfj-92cw-88vg"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        },
        {
          "type": "CVSS_V4",
          "score": "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"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "2.0.7"
                }
              ]
            }
          ],
          "package": {
            "name": "git-diff",
            "purl": "pkg:npm/git-diff",
            "ecosystem": "npm"
          },
          "database_specific": {
            "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-6wfj-92cw-88vg/GHSA-6wfj-92cw-88vg.json"
          }
        }
      ],
      "modified": "2026-10-27T16:15:05.342333Z",
      "provider": "osv",
      "references": [
        "https://nvd.nist.gov/vuln/detail/CVE-2026-110634",
        "https://github.com/danday74/git-diff/pull/16",
        "https://github.com/danday74/git-diff/commit/bfd727b6cf1daa671c3528d1d681f55b70e8fb19",
        "https://github.com/danday74/git-diff",
        "https://github.com/danday74/git-diff/blob/a85a649badc4c6bba991e87e82382b7d3cdd6634/js/gitDiffReal/generateDiff/index.js#L26-L30",
        "https://www.vulncheck.com/advisories/git-diff-before-2.0.7-os-command-injection-via-gitdiff-input-strings"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-78"
        ],
        "severity": "CRITICAL",
        "github_reviewed": true,
        "nvd_published_at": "2026-10-14T15:17:16Z",
        "github_reviewed_at": "2026-10-27T16:09:34Z"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-110634",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/database_specific/severity"
  },
  "source_id": "core-osv",
  "document_id": 462863,
  "published_at": "2026-10-14T15:32:27+00:00"
}