CVE-2026-102827 in simple-gitinfo

Summary

by MITRE • 09/29/2026

simple-git, an interface for running git commands in any node.js application, enables applications to execute Git operations from JavaScript. Prior to 4.0.0, the default blockUnsafeOperationsPlugin compares parsed option names with literal dangerous option spellings while Git accepts unambiguous long-option abbreviations. Attacker-influenced push arguments such as abbreviated --receive-pack or --exec forms can therefore bypass detectVulnerableFlags, reach git push against a local or file remote or an attacker-influenced receive-pack target, and cause Git to invoke an attacker-selected command in consumers that expose those arguments. The clone-side abbreviation handling does not protect the push path. This issue is fixed in 4.0.0.

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 09/29/2026

The vulnerability identified in simple-git versions prior to 4.0.0 represents a critical security flaw rooted in insufficient input validation and command injection risks within the library's safety mechanisms. Simple-git serves as an interface for executing Git commands from Node.js applications, allowing developers to perform version control operations programmatically. To mitigate the risk of arbitrary code execution through maliciously crafted git arguments, the library implements a default blockUnsafeOperationsPlugin designed to detect and prevent dangerous command flags. However, this security control relies on a naive string matching approach that compares parsed option names against a hardcoded list of literal dangerous spellings. This implementation fails to account for Git's behavior regarding long-option abbreviations, where Git accepts unambiguous shortened forms of full command-line options as equivalent to their complete counterparts.

The technical flaw arises because the detection logic does not normalize or fully expand abbreviated arguments before performing its safety checks. An attacker who can influence push arguments is able to bypass the detectVulnerableFlags mechanism by using abbreviated versions of dangerous flags, such as --receive-pack or --exec. Because Git interprets these abbreviations correctly and maps them to their full functional equivalents, the application proceeds with the operation despite the presence of a flag that should have been blocked. This discrepancy between the library's validation logic and Git's actual parsing behavior creates a bypass vector for command injection attacks. The vulnerability specifically affects the push path, as the clone-side abbreviation handling does not provide equivalent protection against similar manipulation techniques in that context.

The operational impact of this vulnerability is severe, potentially leading to remote code execution on systems where simple-git is used with untrusted input. By exploiting the abbreviated flag bypass, an attacker can force Git to execute a push operation targeting a local or file-based remote repository, or direct it toward an attacker-controlled receive-pack target. In such scenarios, Git invokes commands specified by the attacker through these manipulated arguments. This allows for arbitrary command execution within the context of the Node.js application running simple-git. The severity is compounded if the application exposes user-controllable input to git push operations without rigorous sanitization beyond what simple-git provides, as this flaw effectively neutralizes one layer of defense against injection attacks.

To mitigate this vulnerability and prevent similar issues in future implementations, it is imperative to upgrade to version 4.0.0 or later of simple-git, where the blockUnsafeOperationsPlugin has been corrected to properly handle abbreviated options. For applications that cannot immediately upgrade, developers should implement additional input validation layers that normalize command arguments before passing them to git commands. This includes expanding all long-option abbreviations to their full forms prior to safety checks and ensuring that only explicitly allowed flags are permitted for push operations. Adhering to the principle of least privilege by restricting which git subcommands can be executed via simple-git further reduces the attack surface. Security teams should also review existing codebases for any direct usage of dangerous git options like --exec or --receive-pack in user-facing inputs, ensuring that such paths are either removed or heavily sanitized using robust parsing libraries rather than relying solely on string matching against literal spellings. This incident highlights the importance of aligning security controls with the actual behavior of underlying system tools and considering edge cases such as abbreviation handling in command-line interfaces.

Responsible

GitHub M

Reservation

09/29/2026

Disclosure

09/29/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Might our Artificial Intelligence support you?

Check our Alexa App!