Skip to content

← Public intelligence

npm package

simple-git

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

10 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. Critical, CVSS 9.2npmAmendedPublished

    simple-git unsafe-operation guard does not block trailer command configuration

    CVE-2026-102828 · GHSA-x6jw-m9v5-85vh

    Affected
    • npm simple-git >= 3.15.0, < 4.0.1
    Fixed in
    4.0.1· Vendor fix available
    Issue
    Affected product The default blockUnsafeOperationsPlugin in simple-git when an application permits untrusted values to reach SimpleGitOptions.config or Git inline configuration arguments such as -c <key=<value. Summary trailer.<token.cmd is not recognized as unsafe by the default guard. Therefore, a configured inline value reaches Git without a GitPluginError. Git documents trailer.<token.cmd as a shell command invoked by git interpret-trailers. An application that relies on the default plugin to reject unsafe configuration can therefore execute a command supplied through an untrusted trailer-command configuration value. Technical details simple-git/src/lib/git-factory.ts installs commandConfigPrefixingPlugin before blockUnsafeOperationsPlugin. The prefixing plugin in simple-git/src/lib/plugins/command-config-prefixing-plugin.ts turns every SimpleGitOptions.config entry into -c <key=<value before the unsafe-operation plugin evaluates the final argv. In simple-git@3.36.0,…

    Recommended action: Upgrade to 4.0.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.com (1)osv.dev (2)Source checked Evidence →
  2. High, CVSS 8.1npmAmendedPublished

    simple-git allows command execution through unblocked Git configuration includes

    CVE-2026-102826 · GHSA-g4wm-2vf7-vfgr

    Affected
    • npm simple-git <= 3.36.0
    Fixed in
    4.0.0· Vendor fix available
    Issue
    An OS command injection vulnerability in git.clone() allows any application that flows attacker-influenced data into customArgs to execute arbitrary code. simple-git 3.36.0 (current latest on npm) ships without any include.path entry in the blockUnsafeOperationsPlugin denylist. Passing -c include.path=<file via customArgs loads any local file as a gitconfig. The loaded file can set core.sshCommand (or any otherwise-denied key), and the next remote operation in the same clone executes the attacker's command. PR #1167 (merged to main 2026-05-10, not yet released to npm) adds preventConfigBuilder('include.path', 'allowUnsafeInclude') to the denylist. The generated regex /\sinclude.path/ closes the plain spelling but does not match the conditional form includeIf.<cond.path. The variant therefore survives the upcoming release if the regex is not tightened in the same cycle. This sits in the same denylist class as the prior incomplete-fix chain (CVE-2022-24433, CVE-2022-24066,…

    Recommended action: Upgrade to 4.0.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.com (1)osv.dev (2)Source checked Evidence →
  3. High, CVSS 8.1npmAmendedPublished

    simple-git: unsafe-operations plugin bypass via git long-option abbreviation (--receive-p/--exe) -> command execution (residual of CVE-2026-28291)

    CVE-2026-102827 · GHSA-858h-whjf-mvg5

    Affected
    • npm simple-git <= 3.36.0
    Fixed in
    4.0.0· Vendor fix available
    Issue
    simple-git's blockUnsafeOperationsPlugin blocks dangerous git options (--upload-pack/--receive-pack/--exec/...) unless the consumer opts in via unsafe:{allowUnsafePack:true}. Detection (@simple-git/argv-parser detectVulnerableFlags) matches the parsed flag NAME against literal-spelling patterns: /--(upload|receive)-pack/ (requires the literal '-pack') and the string '--exec'. But git accepts unambiguous prefix abbreviations of long options, and expandToken (token-expander.ts) returns the LITERAL token as flag.name (it uses the spec only for needsNext, never to canonicalize). So git push --receive-p=<cmd parses with flag.name='--receive-p', which /--(upload|receive)-pack/ does NOT match, yet git expands --receive-p - --receive-pack and runs <cmd (on a local/file remote, locally). The clone side is robust (its '--u' substring rule catches every --upload abbreviation); the push --receive- and --exe abbreviations have no equivalent rule and slip through. Proof of concept (latest:…

    Recommended action: Upgrade to 4.0.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.com (1)osv.dev (2)Source checked Evidence →
  4. High, CVSS 8.2npmAmendedPublished

    simple-git is vulnerable to Remote Code Execution

    CVE-2026-6951 · GHSA-hffm-xvc3-vprc

    Affected
    • npm simple-git < 3.36.0
    Fixed in
    3.36.0· Vendor fix available
    Issue
    Versions of the package simple-git before 3.36.0 are vulnerable to Remote Code Execution (RCE) due to an incomplete fix for CVE-2022-25912 that blocks the -c option but not the equivalent --config form. If untrusted input can reach the options argument passed to simple-git, an attacker may still achieve remote code execution by enabling protocol.ext.allow=always and using an ext:: clone source.

    Recommended action: Upgrade to 3.36.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  5. High, CVSS 8.1npmAmendedPublished

    simple-git Affected by Command Execution via Option-Parsing Bypass

    CVE-2026-28291 · GHSA-jcxm-m3jx-f287

    Affected
    • npm simple-git < 3.32.0
    Fixed in
    3.32.0· Vendor fix available
    Issue
    simple-git enables running native Git commands from JavaScript. Some commands accept options that allow executing another command; because this is very dangerous, execution is denied unless the user explicitly allows it. This vulnerability allows a malicious actor who can control the options to execute other commands even in a “safe” state where the user has not explicitly allowed them. The vulnerability was introduced by an incorrect patch for CVE-2022-25860. It is likely to affect all versions prior to and including 3.28.0. Detail This vulnerability was introduced by an incorrect patch for CVE-2022-25860. It was reproduced in the following environment: The issue was not reproduced on Windows 11. The -u option, like --upload-pack, allows a command to be executed. Currently, the -u and --upload-pack options are blocked in the file simple-git/src/lib/plugins/block-unsafe-operations-plugin.ts. However, the problem is that command option parsing is quite flexible. By brute…

    Recommended action: Upgrade to 3.32.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  6. Critical, CVSS 9.8npmAmendedPublished

    simple-git has blockUnsafeOperationsPlugin bypass via case-insensitive protocol.allow config key enables RCE

    CVE-2026-28292 · GHSA-r275-fr43-pm7q

    Affected
    • npm simple-git >= 3.15.0, < 3.32.3
    Fixed in
    3.32.3· Vendor fix available
    Issue
    The blockUnsafeOperationsPlugin in simple-git fails to block git protocol override arguments when the config key is passed in uppercase or mixed case. An attacker who controls arguments passed to git operations can enable the ext:: protocol by passing -c PROTOCOL.ALLOW=always, which executes an arbitrary OS command on the host machine. --- Details The preventProtocolOverride function in simple-git/src/lib/plugins/block-unsafe-operations-plugin.ts (line 24) checks whether a -c argument configures protocol.allow using this regex: This regex is case-sensitive. Git treats config key names case-insensitively — it normalises them to lowercase internally. As a result, passing PROTOCOL.ALLOW=always, Protocol.Allow=always, or any mixed-case variant is not matched by the regex, the check returns without throwing, and git is spawned with the unsafe argument. Verification that git normalises the key: The fix is a single character — add the /i flag: --- poc.js --- Test Results Vector 1 —…

    Recommended action: Upgrade to 3.32.3 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.com (1)osv.dev (2)Source checked Evidence →
  7. Critical, CVSS 9.8npmAmendedPublished

    Remote code execution in simple-git

    CVE-2022-25860 · GHSA-9w5j-4mwv-2wj8

    Affected
    • npm simple-git < 3.16.0
    Fixed in
    3.16.0· Vendor fix available
    Issue
    Versions of the package simple-git before 3.16.0 are vulnerable to Remote Code Execution (RCE) via the clone(), pull(), push() and listRemote() methods, due to improper input sanitization. This vulnerability exists due to an incomplete fix of CVE-2022-25912.

    Recommended action: Upgrade to 3.16.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  8. High, CVSS 8.1npmAmendedPublished

    simple-git vulnerable to Remote Code Execution when enabling the ext transport protocol

    CVE-2022-25912 · GHSA-9p95-fxvg-qgq2

    Affected
    • npm simple-git < 3.15.0
    Fixed in
    3.15.0· Vendor fix available
    Issue
    The package simple-git before 3.15.0 is vulnerable to Remote Code Execution (RCE) when enabling the ext transport protocol, which makes it exploitable via clone() method. This vulnerability exists due to an incomplete fix of CVE-2022-24066.

    Recommended action: Upgrade to 3.15.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  9. High, CVSS 8.1npmAmendedPublished

    Command injection in simple-git

    CVE-2022-24066 · GHSA-28xr-mwxg-3qc8

    Affected
    • npm simple-git < 3.5.0
    Fixed in
    3.5.0· Vendor fix available
    Issue
    simple-git (maintained as git-js named repository on GitHub) is a light weight interface for running git commands in any node.js application.The package simple-git before 3.5.0 are vulnerable to Command Injection due to an incomplete fix of CVE-2022-24433 which only patches against the git fetch attack vector. A similar use of the --upload-pack feature of git is also supported for git clone, which the prior fix didn't cover. A fix was released in simple-git@3.5.0.

    Recommended action: Upgrade to 3.5.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  10. High, CVSS 8.1npmAmendedPublished

    Command injection in simple-git

    CVE-2022-24433 · GHSA-3f95-r44v-8mrg

    Affected
    • npm simple-git < 3.3.0
    Fixed in
    3.3.0· Vendor fix available
    Issue
    The package simple-git before 3.3.0 is vulnerable to Command Injection via argument injection. When calling the .fetch(remote, branch, handlerFn) function, both the remote and branch parameters are passed to the git fetch subcommand. By injecting some git options, it was possible to get arbitrary command execution.

    Recommended action: Upgrade to 3.3.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →