Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-102828 Overview
CVE-2026-102828 is a command injection vulnerability in simple-git, a Node.js interface for running Git commands. The flaw affects versions 3.15.0 through 4.0.0. The default blockUnsafeOperationsPlugin fails to classify trailer.<token>.cmd as unsafe configuration. Applications that pass attacker-controlled values through SimpleGitOptions.config or inline -c arguments allow Git to invoke arbitrary shell commands when git interpret-trailers processes the configured trailer. The command executes with the operating-system identity and permissions of the Node.js process. The issue is fixed in version 4.0.1 and is categorized under [CWE-78] OS Command Injection.
Critical Impact
Attacker-controlled Git configuration values can trigger arbitrary shell command execution under the Node.js process identity.
Affected Products
- simple-git versions 3.15.0 through 4.0.0
- Node.js applications using SimpleGitOptions.config with untrusted input
- Node.js applications passing untrusted values through inline -c Git arguments
Discovery Timeline
- 2026-09-29 - CVE-2026-102828 published to NVD
- 2026-09-29 - Last updated in NVD database
Technical Details for CVE-2026-102828
Vulnerability Analysis
The simple-git package ships a defensive plugin, blockUnsafeOperationsPlugin, that filters known-dangerous Git configuration keys and command-line flags. The plugin previously enumerated keys such as sequence.editor, submodule.update, and tar.command, but omitted trailer.<token>.cmd and trailer.<token>.command. Git's interpret-trailers subcommand executes the value of these configuration keys as a shell command when processing commit trailers. When an application forwards untrusted input into Git configuration, an attacker can inject a trailer.*.cmd entry that runs when Git processes a trailer, obtaining arbitrary command execution on the host.
Root Cause
The root cause is an incomplete allow/deny list in packages/argv-parser/src/vulnerabilities/detect-vulnerable-config-writes.ts. The blocklist did not include the trailer.cmd and trailer.command configuration keys, permitting them to be set through both SimpleGitOptions.config and inline -c key=value arguments. Related unsafe flag handling for git rebase -x / --exec was also under-enforced.
Attack Vector
Exploitation requires an application that forwards attacker-controlled data into Git configuration passed to simple-git. The attacker supplies a configuration entry such as -c trailer.inject.cmd=<shell command> and induces the application to run a Git operation that invokes git interpret-trailers. The configured command runs with the same OS identity as the Node.js process, enabling code execution, data exfiltration, or lateral movement inside the application's environment.
// Security patch: packages/argv-parser/src/vulnerabilities/detect-vulnerable-config-writes.ts
preventConfigBuilder('sequence.editor', 'allowUnsafeEditor'),
preventExpandedConfigBuilder('submodule.update', 'allowUnsafeSubmodule'),
preventExpandedConfigBuilder('tar.command', 'allowUnsafeCommandBinaries'),
+ preventExpandedConfigBuilder('trailer.cmd', 'allowUnsafeCommandBinaries'),
+ preventExpandedConfigBuilder('trailer.command', 'allowUnsafeCommandBinaries'),
preventExpandedConfigBuilder('url.insteadOf', 'allowUnsafeUrlRewrite'),
];
Source: GitHub Commit d762810
// Security patch: packages/argv-parser/src/vulnerabilities/detect-vulnerable-flags.ts
preventFlagBuilder('clone', /^-\w*u/, 'allowUnsafePack'),
preventFlagBuilder('clone', '--u', 'allowUnsafePack'),
preventFlagBuilder('push', /^--exec$/, 'allowUnsafePack', { name: '--exec' }),
+ // `git` accepts unambiguous abbreviations of long options, so `--ex` and `--exe` are `--exec`
+ preventFlagBuilder('rebase', /^(-x|--ex(ec?)?)$/, 'allowUnsafeExec', { name: '-x or --exec' }),
preventFlagBuilder(null, '--template', 'allowUnsafeTemplateDir'),
preventFlagBuilder(null, '--exec-path', 'allowUnsafeExec', pathTakingGlobal),
Source: GitHub Pull Request #1198
Stop Remote Code Execution Before It Runs
Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.
Stop Exploit AttemptsDetection Methods for CVE-2026-102828
Indicators of Compromise
- Git configuration entries containing trailer.*.cmd or trailer.*.command keys with executable payloads.
- Node.js processes spawning unexpected child processes (shells, network utilities) shortly after invoking Git operations.
- Presence of simple-git package versions 3.15.0 through 4.0.0 in package.json or lockfiles.
- HTTP request bodies or API parameters containing -c trailer. fragments forwarded to Git tooling.
Detection Strategies
- Perform software composition analysis on Node.js projects to identify vulnerable simple-git versions.
- Instrument process telemetry to alert on unexpected child processes spawned by node or Git binaries.
- Review application code for direct forwarding of user input into SimpleGitOptions.config or inline -c arguments.
Monitoring Recommendations
- Monitor CI/CD runners and Git automation hosts for anomalous shell invocations originating from Git subprocesses.
- Log and audit all invocations of git interpret-trailers, particularly with non-default configuration.
- Enable outbound network egress monitoring on hosts running Node.js Git automation to detect exfiltration.
How to Mitigate CVE-2026-102828
Immediate Actions Required
- Upgrade simple-git to version 4.0.1 or later across all Node.js applications and build pipelines.
- Audit application code paths that pass user-supplied data into SimpleGitOptions.config or inline -c arguments.
- Rotate credentials and secrets accessible to any host that ran an unpatched simple-git with untrusted input.
Patch Information
The fix is available in simple-git@4.0.1. The patch, tracked in GitHub Pull Request #1198 and commit d762810, extends blockUnsafeOperationsPlugin to reject trailer.cmd and trailer.command configuration keys and to block -x / --exec abbreviations on git rebase. Full advisory details are published in GHSA-x6jw-m9v5-85vh and the simple-git 4.0.1 release notes.
Workarounds
- Strictly validate and allowlist any configuration keys before forwarding them to simple-git.
- Reject user-supplied strings containing trailer. prefixes or -c sequences prior to invoking Git.
- Run Git automation under a dedicated low-privilege OS user with no access to production secrets.
# Upgrade simple-git to the patched release
npm install simple-git@^4.0.1
# Verify installed version
npm ls simple-git
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

