CVE-2026-6951
Received Received - Intake
Remote Code Execution in simple-git Before 3.36.0 via Config Options

Publication date: 2026-04-25

Last updated on: 2026-04-29

Assigner: Snyk

Description
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](https://security.snyk.io/vuln/SNYK-JS-SIMPLEGIT-3112221) 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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-04-25
Last Modified
2026-04-29
Generated
2026-05-07
AI Q&A
2026-04-26
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 2 associated CPEs
Vendor Product Version / Range
steveukx simple-git to 3.36.0 (exc)
steveukx simple-git 3.36.0
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-94 The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

CVE-2026-6951 is a Remote Code Execution (RCE) vulnerability in the simple-git npm package versions before 3.36.0. It arises because an incomplete fix for a previous vulnerability (CVE-2022-25912) blocked the use of the `-c` option but did not block the equivalent `--config` option. This allows an attacker to pass untrusted input to the options argument of simple-git's clone function.

By enabling the Git configuration `protocol.ext.allow=always` via the `--config` option and using an `ext::` clone source, an attacker can execute arbitrary shell commands on the host system running the Node.js process.

A proof-of-concept demonstrates this by cloning a repository with a command that executes shell commands, such as creating a file on the target system.


How can this vulnerability impact me? :

This vulnerability allows remote attackers to execute arbitrary code on the host system running the vulnerable simple-git package without requiring any privileges or user interaction.

If an application uses simple-git and passes attacker-controlled input to the options parameter of the clone function, the attacker can run arbitrary shell commands, potentially compromising the entire system.

The impact includes full compromise of confidentiality, integrity, and availability of the affected system, as indicated by the high CVSS scores (v3.1 base score 9.8).


How can this vulnerability be detected on my network or system? Can you suggest some commands?

Detection of this vulnerability involves scanning for unsafe usage of Git configuration keys and environment variables that could be exploited by CVE-2026-6951.

Specifically, the vulnerability can be detected by checking if the simple-git package is used with untrusted input passed to the options argument, especially if the --config option is used to enable protocol.ext.allow=always.

There is no direct network command provided, but reviewing usage of simple-git clone commands with the --config option and scanning environment variables such as GIT_CONFIG_COUNT and core.fsmonitor related variables can help identify potential exploitation attempts.

Additionally, the updated simple-git library includes enhanced filtering and scanning mechanisms to detect unsafe Git configuration operations and environment variables, which can be used as part of vulnerability checks.

A practical approach is to audit your codebase or logs for commands similar to the proof-of-concept usage: invoking simple-git clone with the --config option set to protocol.ext.allow=always and an ext:: clone source.


What immediate steps should I take to mitigate this vulnerability?

The primary mitigation step is to upgrade the simple-git package to version 3.36.0 or later, where the vulnerability is fixed by properly blocking the --config option to prevent exploitation.

Until the upgrade is applied, avoid passing untrusted input to the options argument of simple-git's clone function, especially any usage of the --config option that enables protocol.ext.allow=always.

Review and restrict environment variables related to Git configuration such as GIT_CONFIG_COUNT and core.fsmonitor to reduce the risk of environment-based attacks.

Audit your code and dependencies to ensure that no unsafe Git configuration keys or environment variables are used that could be exploited.


How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

The provided information does not include any details on how CVE-2026-6951 affects compliance with common standards and regulations such as GDPR or HIPAA.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart