simple-git
CVE-2026-102827 · GHSA-858h-whjf-mvg5
Unsafe-operation option interpretation mismatch
High, 8.1 · Public source snapshot: November 12, 2026
Original portfolio report · Public advisory · Source reference
Shared credits and the scope of my investigation are documented below.
Mallory can cross a Node.js application's intended command-execution boundary if the application forwards attacker-influenced Git options to simple-git and relies on its unsafe-operation filter. The wrapper and Git do not interpret every option spelling identically. This is conditional on an application exposing those arguments; using simple-git alone does not make an application remotely exploitable.
The public advisory assigns CVE-2026-102827 / GHSA-858h-whjf-mvg5, rates it High, 8.1, lists versions through 3.36.0 as affected and 4.0.0 as patched, and credits me (the-vibe-dev) as a Reporter, alongside other researchers. This consolidated advisory is counted once.
I inspected the official release tags and relevant history, but did not execute an exploit. Importantly, the inspected 4.0.0 source does not establish a complete fix for the advisory's described push-option gap; the remediation status below preserves that discrepancy.
simple-git constructs Git subprocess calls for Node.js applications. Its default unsafe-operation plugin rejects recognized options that can select executable helpers, unless the consumer explicitly enables the corresponding unsafe category. That is separate from an application's own authorization and input validation.
Mallory needs control over options reaching a relevant operation, not merely access to repository contents. The resulting execution context depends on the Git operation and target; local/path-based execution is distinct from execution on a remote Git server. Deployment prevalence and applications exposing this input were not measured.
In 3.36.0, simple-git/src/lib/plugins/block-unsafe-operations-plugin.ts, function blockUnsafeOperationsPlugin, delegates argument checking to vulnerabilityCheck and raises GitPluginError only for recognized, non-enabled categories.
The decisive mismatch is inside packages/argv-parser. src/tokens/token-expander.ts, function expandToken, preserves the caller's literal long-option name. src/flags/parse-task-flags.ts, function parseTaskFlags, transfers that name to the parsed flag. src/vulnerabilities/detect-vulnerable-flags.ts, function detectVulnerableFlags, tests it against spelling-based matchers rather than a canonical option identity.
We therefore have two interpretations of the same input: the wrapper checks the literal spelling, while Git can recognize an unambiguous long-option abbreviation. A name missed by the wrapper can still select a security-sensitive Git behavior. Ordinary full-spelling rejection does not prove equivalent spellings are rejected.
History shows that the older preventUploadPack implementation added spelling-based pack and push-execution checks in late 2022. Release 3.16.0 already contains those checks; the later parser architecture retains the underlying distinction in 3.36.0. This establishes representative history, not an independently verified affected range for every intermediate release or every older API.
The source establishes a filtering gap, not a universal remote shell. Command execution requires the application to expose a relevant argument path and Git to reach an executable-helper operation under the actual environment. Existing application-side allowlists, fixed operation parameters, permissions and process isolation can materially constrain that path.
This review did not run positive or negative controls. Useful authorized regression coverage would compare ordinary accepted arguments, rejected dangerous options, equivalent accepted spellings and application-side rejection, while confirming that forbidden helpers never execute.
No exploit artifact, command sequence or execution output is included. The public advisory contains the upstream demonstration. This report is a static-source analysis and does not present that demonstration as independently reproduced.
Follow current upstream security guidance and review upgrade compatibility, but do not treat this report as verification that 4.0.0 closes the precise described gap. In the 4.0.0 release source, expandToken still preserves literal names, and the pack and push matchers remain spelling-based. The same relevant matchers remain in the inspected 4.0.2 tag. Other security changes in those releases are not proof of correction of this specific behavior.
Applications should avoid forwarding arbitrary user-supplied options, construct operations from a narrow allowlist, and keep unsafe opt-ins disabled. The underlying policy should evaluate canonical Git option identities, with task-aware handling of equivalent spellings. Regression tests should enforce that boundary without accidentally prohibiting unrelated benign options. These are defensive recommendations, not an inspected complete upstream fix.
This public assignment records a conditional command-execution risk where literal argument filtering disagrees with Git's interpretation. The inspected affected source supports that root cause. The advisory's patched-version claim and the inspected release code remain distinct; resolving that discrepancy is necessary before claiming source-verified remediation.