Packages
simple-git 4.1.0: Patching CVE-2026-134815 Argument Injection, Strict Mode, and v4 Upgrade Trade-Offs
With 15.2M weekly npm downloads and 8,659 dependents, simple-git is the backbone of Node.js Git automation. On November 22–23, 2026, CVE-2026-134815 (CVSS 4.0: 9.2 Critical) disclosed an argument injection bypass in versions before 4.1.0—learn how git.cmd, strict mode, and @simple-git/argv-parser 3.0.0 close the gap.
7 min read
simple-git 4.1.0: Patching CVE-2026-134815 Argument Injection, Strict Mode, and v4 Upgrade Trade-Offs
Executive Summary
On November 22–23, 2026, the CVE Program (with VulnCheck acting as CNA) and the European Union Vulnerability Database (EUVD) published CVE-2026-134815 (CVE.org; EUVD), a critical argument injection vulnerability (CWE-88) affecting simple-git prior to version 4.1.0 and its companion parser package @simple-git/argv-parser prior to 3.0.0.
With 15,226,541 weekly npm downloads and 8,659 direct dependent packages verified as of November 24, 2026 (npm), simple-git is one of the most widely deployed Node.js wrappers for automating Git workflows, CI/CD runners, and developer tooling—including AI coding agent sandboxes that clone and inspect repositories.
Key engineering takeaways from this release:
- Critical Argument Injection Patched (
CVSS 4.0: 9.2/CVSS 3.1: 8.1): Versions before4.1.0allowed attackers who influence arguments passed tolistRemote()orraw()to bypass theallowUnsafePackguard by supplying--execto non-push Git commands (ls-remote,archive,fetch-pack, orsend-pack), enabling arbitrary host command execution (CVE.org). - Modernized v4 Packaging & Breaking Entrypoints: Upgrading from
simple-gitv3 to4.1.0removes the deprecated/promiseand default entrypoints, blocks abbreviated Git options, and requires named imports (import { simpleGit } from 'simple-git') (npm). - Defense-in-Depth Opt-In (
git.cmd&strict): Even on4.1.0,strictmode andunsafe.recommendedremain disabled by default in v4 (scheduled to flip on in v5 and v6), so production teams handling untrusted URLs or branch names must explicitly adoptgit.cmdtagged templates andstrict: true(npm).
Adoption Telemetry & Version Changelog
simple-git provides a lightweight Promise- and callback-based interface for spawning the system git binary from Node.js applications, managing child-process concurrency (maxConcurrentProcesses, defaulting to 6 in configuration examples) and parsing stdout/stderr into typed TypeScript objects (npm).
As verified on the npm registry on November 24, 2026:
| Package Attribute | Verified Value (Nov 24, 2026) | Source |
|---|---|---|
| Latest Version | 4.1.0 (published Nov 2026) |
npm |
| Companion Security Fix | @simple-git/argv-parser@3.0.0 |
CVE.org |
| Weekly npm Downloads | 15,226,541 |
npm |
| Direct npm Dependents | 8,659 packages |
npm |
| Published Versions | 278 |
npm |
| Runtime Dependencies | 5 (including @kwsites/file-exists and @simple-git/argv-parser) |
npm |
| License | MIT |
npm |
| System Requirement | Local git binary in PATH (or via .customBinary()); AbortController requires Node >= 16 |
npm |
Version Milestones Toward 4.1.0
v3.33.0Pathspec Hardening: Updated.clone()and.mirror()sorepoPathandlocalPathare passed as Git pathspec arguments, reducing exposure when unsanitized strings reach clone calls (npm).v4.0.xModernization: Standardized CommonJS, ESM, and TypeScript consumption, dropped/promiseand default entrypoints, blocked abbreviated Git CLI flags, and introducedgit.cmdtagged template literals withremoteUrl(),refName(), andpathspec()helpers (npm).v4.1.0&@simple-git/argv-parser@3.0.0(Nov 2026): PatchedCVE-2026-134815in commitc8ee6bb4dd0c1259af31da821dc68d74ff5d6f10, closing the--execbypass indetect-vulnerable-flags.ts(CVE.org).
Security Patches, Breaking Changes & Internals
Root Cause of CVE-2026-134815 (CWE-88)
Because simple-git spawns the native git CLI binary, its primary security boundary relies on @simple-git/argv-parser to inspect argument lists before execution. Prior to 4.1.0, the allowUnsafePack guard (implemented in packages/argv-parser/src/vulnerabilities/detect-vulnerable-flags.ts at line 71 in simple-git@4.0.2) aimed to block dangerous upload/receive-pack execution flags (CVE.org).
However, researcher Zachariah Mithani (AploSec) discovered that an attacker who can influence arguments passed to listRemote() or raw() could supply the --exec option to non-push Git operations—specifically ls-remote, archive, fetch-pack, or send-pack—bypassing the allowUnsafePack check and executing arbitrary OS commands on the host (CVE.org).
Severity Scoring & Exploitation Status
- CVSS 4.0:
9.2Critical (CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N) (CVE.org) - CVSS 3.1:
8.1High (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H) (CVE.org) - Exploitation Status: As of November 23, 2026, active exploitation has not been reported and the vulnerability is not listed in the CISA KEV catalog (isMalicious).
Breaking Changes & Safe git.cmd Usage in v4.1.0
Upgrading from 3.x to 4.1.0 introduces two deliberate breaking shifts alongside the security fix:
- Removed Legacy Entrypoints: Imports from
simple-git/promiseor default imports (import simpleGit from 'simple-git') fail in v4; callers must use named exports (import { simpleGit } from 'simple-git') (npm). - Abbreviated Flags Rejected: Short/abbreviated Git CLI flags are blocked in v4 to prevent option-smuggling ambiguities (npm).
For any workflow that accepts user-supplied repository URLs, branch names, or file paths—such as web webhooks, SaaS repo importers, or AI agent tools—the simple-git documentation explicitly warns against interpolating untrusted data into options objects or raw() arrays, recommending git.cmd with strict: true instead (npm):
import { pathspec, refName, remoteUrl, simpleGit } from 'simple-git';
// Enable strict mode so untrusted config keys and env vars are blocked
const git = simpleGit({
strict: true,
allowConfig: ['user.name', 'user.email'],
allowEnvironment: ['HOME'],
});
// Safe: remoteUrl() restricts protocols; pathspec() prevents flag injection
await git.cmd`clone --depth 1 ${remoteUrl(userRepoUrl, { protocols: ['https'] })} ${pathspec(targetDir)}`;
// Safe: refName() validates branch/tag names; -- separates options from pathspecs
await git.cmd`checkout -b ${refName(branchName)}`;
await git.cmd`ls-remote -- ${remoteUrl(userRepoUrl, { protocols: ['https'] })}`;
If an untrusted value begins with - outside a pathspec() or after --, git.cmd rejects it before spawning git—and remote helper transports (ext::..., fd::...) are always blocked (npm).
Ecosystem Comparison & Upgrade Checklist
Node.js teams automating Git generally choose between wrapping the native git binary (simple-git) and running a pure-JavaScript Git implementation (isomorphic-git). Both are MIT-licensed, but their security and operational trade-offs differ sharply:
| Criteria | simple-git (v4.1.0) |
isomorphic-git (v1.43.1 / v1.44.x) |
|---|---|---|
| Execution Model | Spawns native git child processes (npm) |
Pure JavaScript reimplementation modifying .git directly (npm) |
| Weekly npm Downloads | 15,226,541 (npm) |
1,864,896 (npm) |
| Direct Dependents | 8,659 (npm) |
688 (npm) |
| Runtime Dependencies | 5 (npm) |
10 (npm) |
| Browser / Worker Support | Node.js only (requires git binary) (npm) |
Node.js, browsers, WebWorkers, ServiceWorkers (needs CORS proxy for browser remotes) (npm) |
| Argument Injection Surface | Present if untrusted flags reach raw()/listRemote() prior to 4.1.0 (CVE.org) |
Eliminates OS process-spawning / CLI flag-injection class entirely |
Upgrade & Hardening Checklist
- Verify Installed Versions: Run
npm ls simple-git @simple-git/argv-parserto catch transitive copies inside monorepos and build tools. Confirmsimple-git >= 4.1.0and@simple-git/argv-parser >= 3.0.0(CVE.org). - Audit
listRemote()andraw()Call Sites: Inspect every call to.listRemote()and.raw(). Never pass user-supplied strings into options arrays or objects; migrate dynamic commands togit.cmdtagged templates (npm). - Turn On
strict: trueorunsafe.recommended: true: Remember that both flags default tofalsein v4 (before becoming defaults in v5/v6). Enablestrict: trueon any instance that touches untrusted repositories (npm). - Update v3 Imports: Replace
simple-git/promiseor default imports withimport { simpleGit } from 'simple-git'(orconst { simpleGit } = require('simple-git')in CommonJS) (npm). - Pin Lockfiles & Test: Regenerate
package-lock.json/pnpm-lock.yamlso@simple-git/argv-parser@3.0.0is resolved even if a transitive dependency pins^4.0.0ofsimple-git.
Frequently Asked Questions
1. Which versions of simple-git are affected by CVE-2026-134815?
All simple-git versions prior to 4.1.0 and @simple-git/argv-parser versions prior to 3.0.0 are affected (CVE.org).
2. Is my app vulnerable if it only runs hardcoded git.status() or git.pull() calls?
If no untrusted user input ever reaches listRemote(), raw(), or options arrays/objects, an attacker cannot inject --exec through those paths. However, upgrading to 4.1.0 and enabling strict: true is still recommended to close transitive and future exposure (CVE.org; npm).
3. Why didn't allowUnsafePack block --exec before 4.1.0?
The allowUnsafePack guard previously focused on push/pack contexts, leaving --exec usable on non-push operations (ls-remote, archive, fetch-pack, and send-pack) via listRemote() or raw() (CVE.org).
4. Does simple-git 4.1.0 support both CommonJS and ES Modules?
Yes. simple-git v4 supports both require('simple-git') and import { simpleGit } from 'simple-git', along with bundled TypeScript definitions, though the legacy /promise and default entrypoints were removed in v4 (npm).
5. Should I switch from simple-git to isomorphic-git for security?
If your Node.js service only needs basic clone/commit/status operations on untrusted inputs and you want to avoid spawning child git processes altogether, isomorphic-git removes the CLI argument-injection attack surface. If you rely on full native git parity, SSH agent/credential helpers, or high-speed pack operations on large repos, simple-git@4.1.0 with strict: true and git.cmd remains the standard choice (npm; isomorphic-git).
Sources
- CVE Program / VulnCheck CNA (Primary):
CVE-2026-134815—simple-gitbefore 4.1.0 Argument Injection via--execOption inls-remote— https://www.cve.org/CVERecord?id=CVE-2026-134815 (Published November 22, 2026) - npm Registry (Primary):
simple-gitv4.1.0 Package Page & Security Documentation — https://www.npmjs.com/package/simple-git (Accessed November 24, 2026) - European Union Vulnerability Database (Primary): EUVD Critical Vulnerabilities Feed (
CVE-2026-134815) — https://euvd.enisa.europa.eu/ (November 2026) - npm Registry (Primary):
isomorphic-gitPackage & Dependency Telemetry — https://npmjs.com/package/isomorphic-git (Accessed November 24, 2026) - isMalicious CVE Tracker (Secondary):
CVE-2026-134815Exploitation & CISA KEV Status — https://ismalicious.com/cve/CVE-2026-134815 (November 23, 2026)