Critical Flaw in simple-git Allows Remote Code Execution

A newly disclosed vulnerability in simple-git, a widely used Node.js library for executing Git commands, has been rated “Critical” and could allow attackers to execute arbitrary commands on vulnerable servers. Tracked as CVE-2026-134815, the issue stems from how simple-git handles arguments passed to certain functions when user input isn’t properly validated.

What the Vulnerability Is

The weakness lies in versions of simple-git prior to 4.1.0, and in the companion package @simple-git/argv-parser versions older than 3.0.0. These packages perform inadequate checks on user-supplied input, allowing malicious arguments to slip through to Git commands. Specifically, attacker-controlled input to the listRemote() or raw() functions can be used to inject the --exec flag into operations like ls-remote, archive, fetch-pack, or send-pack. When Git sees --exec, it may execute external programs, granting attackers remote code execution under the same permissions as the Node.js process.

Severity, Scope, and History

The National Vulnerability Database’s report classifies this as an argument-injection flaw (CWE-88) with a CVSS v4.0 score of 9.2. No authentication is required, and user interaction is unnecessary—though certain deployment setups are needed for exploitation. The vulnerability could endanger data integrity, system availability, and allow full system compromise.

Two packages are involved: simple-git (<4.1.0) and @simple-git/argv-parser (<3.0.0). The latter is responsible for filtering out dangerous flags, making both updates essential. Incidents like this echo past simple-git bugs: CVE-2022-24433 permitted injection during fetch(), and another flaw this year used case-sensitivity bypasses to escape earlier filters. Attackers have repeatedly found pathways around patched restrictions.

Patches, Mitigations, and Best Practices

The maintainers addressed the issue in the simple-git 4.1.0 release (November 16, 2026), which expanded the protection of its allowUnsafePack guard to block --exec for nearly all commands except rebase. Version 3.0.0 of @simple-git/argv-parser also introduced stricter enforcement. New safeguards include an allowConfig option and a strict mode, plus a helper named git.cmd, which treats all inserted values as untrusted data that can’t alter settings or add options.

To stay protected, developers should update both simple-git and @simple-git/argv-parser to the patched versions. Auditing dependencies—including transitive ones—is critical, since many apps don’t include simple-git directly. Avoid feeding untrusted input into any functions that construct Git commands. Whenever possible, restrict repository URLs or branch names via whitelisting. Running Node.js processes with least-privilege permissions adds another safety layer.

This vulnerability emphasizes a recurring problem: blocking dangerous flags alone is a fragile defense, since the same Git option can be written in multiple equivalent ways. With simple-git being downloaded over 12 million times weekly, this kind of vulnerability has far-reaching potential impact.

Why It Matters: For any app that integrates simple-git and accepts external input for Git operations, the stakes are high. Remote code execution could lead to full server compromise.

What to Watch: Confirm that all instances of simple-git (including in dependencies) are on version 4.1.0 or newer, and that @simple-git/argv-parser is at least version 3.0.0. Audit code to block any raw user input going into Git commands. Follow the new options allowConfig and strict to bolster defenses. This episode underlines that security in libraries calling system-level operations is only as strong as their input validation.