Act nowDisclosed

Advisory · CVE-2026-134815

Argument injection in simple-git bypasses the unsafe-flag guard

simple-git before 4.1.0 lets attackers bypass the allowUnsafePack guard by supplying the --exec option to non-push git operations, executing commands on the host. CVSS 4.0 9.2.

Vendor
steveukx
Product
simple-git
Identifier / CWE
CVE-2026-134815
CWE-88
Action timing
Immediate
ELI5

Explain it like I’m five

The helper runs git commands for you and has a rule against dangerous flags. A stranger who gets to suggest part of the command can smuggle in a flag the guard was not watching, and that flag tells git to run a program of the stranger's choosing.

SIMPLIFIED_ATTACK_PATH04 STEPS
  1. 01Attacker influences arguments

    An attacker influences arguments passed to simple-git operations such as listRemote() or raw(), for example through a repository URL or user-supplied value.

  2. 02Guard bypassed

    The --exec option is supplied to a non-push git operation, bypassing the allowUnsafePack guard that was meant to block unsafe flags.

  3. 03Git runs the injected command

    Git invokes the attacker-chosen executable through --exec for ls-remote, archive, fetch-pack, or send-pack.

  4. 04Command executes on the host

    The command runs with the privileges of the application using simple-git.

What happened

simple-git before 4.1.0 contains an argument injection vulnerability that bypasses the allowUnsafePack guard. An attacker who can influence arguments passed to operations such as listRemote() or raw() can inject the --exec option into non-push git operations, causing git to execute a command of the attacker’s choosing for ls-remote, archive, fetch-pack, or send-pack. The vulnerability scores CVSS 4.0 9.2 (CVSS 3.1 8.1).

The companion package @simple-git/argv-parser is also affected before 3.0.0, and the fix is released as simple-git 4.1.0 with @simple-git/argv-parser 3.0.0. simple-git is a widely used Node.js wrapper around the git command line, so any service that passes user-influenced values into its operations, such as repository URLs supplied by users, should treat this as directly reachable.

What to do

  1. Inventory Node.js services and tools that depend on simple-git, including transitive dependencies.
  2. Upgrade simple-git to 4.1.0 or later, which pulls in the fixed @simple-git/argv-parser 3.0.0.
  3. Audit call sites that pass user-supplied values into simple-git operations, especially listRemote() and raw(), and validate or allowlist repository URLs and arguments.
  4. Review application and host logs for unexpected git invocations or child processes spawned by services using simple-git.
  5. Confirm the deployed simple-git version after patching.

Management note

This is a guard bypass in a library many teams assume is safe to feed with user input. The fix is a version bump, but the durable lesson is the input boundary: repository URLs and other user-supplied strings reaching a command-line wrapper need validation even when the library advertises a safety guard.