fix(deps): update dependency simple-git to v3.32.3 [security]#222
Open
renovate[bot] wants to merge 1 commit intomainfrom
Open
fix(deps): update dependency simple-git to v3.32.3 [security]#222renovate[bot] wants to merge 1 commit intomainfrom
renovate[bot] wants to merge 1 commit intomainfrom
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
3.32.2→3.32.3GitHub Vulnerability Alerts
CVE-2026-28292
Summary
The
blockUnsafeOperationsPlugininsimple-gitfails to block git protocoloverride 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 anarbitrary OS command on the host machine.
Details
The
preventProtocolOverridefunction insimple-git/src/lib/plugins/block-unsafe-operations-plugin.ts(line 24)checks whether a
-cargument configuresprotocol.allowusing 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:
$ git -c PROTOCOL.ALLOW=always config --list | grep protocol protocol.allow=alwaysThe fix is a single character — add the
/iflag:poc.js
Test Results
Vector 1 — Original CVE-2022-25912 (
protocol.ext.allow=always, lowercase)Result: BLOCKED ✅
The original Snyk PoC payload using lowercase
protocol.ext.allow=alwaysis correctly intercepted bypreventProtocolOverridebefore git is invoked. AGitPluginErroris thrown immediately and the sentinel file is never created.Output:
Vector 2 — Uppercase bypass (
PROTOCOL.ALLOW=always)Result: BYPASSED⚠️ — RCE confirmed
The
preventProtocolOverrideregex/^\s*protocol(.[a-z]+)?.allow/is case-sensitive.PROTOCOL.ALLOW=always(uppercase) passes the check without error. Git normalises config key names to lowercase internally, enabling theext::protocol. The injected shell command executes before git errors on the missing repository stream.Output:
/tmp/pwn-codeantwas created by the git subprocess — command execution confirmed.Vector 3 — Real-world scenario (target:
https://github.com/CodeAnt-AI/codeant-quality-gates)Result: BYPASSED⚠️ — RCE confirmed
An application passes user-controlled
customArgstosimpleGit().clone(). The attacker injectsPROTOCOL.ALLOW=alwaysand substitutes a maliciousext::URL in place of the intended repository URL. The plugin does not block the uppercase variant; git enablesext::and executes the payload before the application can detect the failure.Output:
/tmp/pwn-realworldwas created — arbitrary command execution in a realistic application context confirmed.Summary
protocol.ext.allow=always(lowercase)PROTOCOL.ALLOW=always(uppercase)/tmp/pwn-codeantcreatedPROTOCOL.ALLOW=always+ attacker URL/tmp/pwn-realworldcreatedThe case-sensitive regex in
preventProtocolOverrideblocksprotocol.*.allowbut does not account for uppercase or mixed-case variants. Git accepts all variants identically due to case-insensitive config key normalisation, allowing full bypass of the protection in all versions of simple-git that carry the 2022 fix./tmp/pwnedis created by the git subprocess via theext::protocol.All of the following bypass the check:
-cprotocol.allow=alwaysPROTOCOL.ALLOW=alwaysProtocol.Allow=alwaysPROTOCOL.allow=alwaysprotocol.ALLOW=alwaysImpact
Any application that passes user-controlled values into the
customArgsparameter of
clone(),fetch(),pull(),push()or similarsimple-gitmethods is vulnerable to arbitrary command execution on the host machine.
The
ext::git protocol executes an arbitrary binary as a remote helper.With
protocol.allow=alwaysenabled, an attacker can run any OS commandas the process user — full read, write and execution access on the host.
Release Notes
steveukx/git-js (simple-git)
v3.32.3Compare Source
Patch Changes
f704208: Enhancedprotocol.allowchecks inallowUnsafeExtProtocolhandling.Thanks to @CodeAnt-AI-Security for identifying the issue
Configuration
📅 Schedule: Branch creation - "" in timezone Europe/Istanbul, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.