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
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.
- 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.
- 02Guard bypassed
The --exec option is supplied to a non-push git operation, bypassing the allowUnsafePack guard that was meant to block unsafe flags.
- 03Git runs the injected command
Git invokes the attacker-chosen executable through --exec for ls-remote, archive, fetch-pack, or send-pack.
- 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
- Inventory Node.js services and tools that depend on simple-git, including transitive dependencies.
- Upgrade simple-git to 4.1.0 or later, which pulls in the fixed
@simple-git/argv-parser3.0.0. - Audit call sites that pass user-supplied values into simple-git operations, especially
listRemote()andraw(), and validate or allowlist repository URLs and arguments. - Review application and host logs for unexpected git invocations or child processes spawned by services using simple-git.
- 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.