Skip to content
Exploit for CVE-2026

Exploit for CVE-2026

Sploitus • November 23, 2026

# CVE-2026-134815 — simple-git: command injection through `--exec` on non-push operations

[![License: MIT](

[![Research status: validated](

| **Component** | simple-git — argument validation for Git pack operations |

| **Fixed in** | **4.1.0** — commit `c8ee6bb` (GHSA-24pq-g7mp-w876) |

| **CWE** | CWE-88 (Improper Neutralization of Argument Delimiters), CWE-78 (OS Command Injection) |

| **Impact** | `allowUnsafePack` blocked the `--exec` argument only for `push`. An attacker who could influence arguments passed to `listRemote()` or `raw()` could inject `--exec=` into `ls-remote`, `archive`, `fetch-pack` or `send-pack`; Git then ran the attacker-named program on the host when the operation was attempted |

| **Vector** | attacker-controlled argument array passed to a simple-git API |

| **Trigger** | `git.raw('ls-remote', '--exec=/path/to/attacker-program', 'origin')` |

The pre-fix guard covered only one command:

allowUnsafePack blocked --exec for push only

# all other pack-related commands accepted the option verbatim

--exec is blocked for every command except rebase,

Git's `--exec` option names the program used for the remote side of pack

operations. Treating it as dangerous only for `push` left the same primitive

available through `ls-remote`, `archive`, `fetch-pack` and `send-pack`. When an

application forwarded attacker-influenced arguments into `raw()` or

`listRemote()`, the attacker selected the executable Git invoked. The fix

validates the option across all commands, exempting only `rebase --exec`,

which has different semantics and is gated by `allowUnsafeExec`.

| `sg-vuln` | `cve-2026-134815:vuln` | real `simple-git` 4.0.0 from npm |

| `sg-fixed` | `cve-2026-134815:fixed` | real `simple-git` 4.1.0 from npm |

| `poc` | `cve-2026-134815-poc:local` | stdlib-only Python driver |

The harness stages a local Git repository and an attacker-controlled

`upload-pack` script that writes a marker file. Both `raw()` and

`listRemote()` paths are exercised. Execution is detected by the marker, not

./run-lab.sh build # builds both sides (node:22-alpine + pinned npm packages)

./run-lab.sh up # cve134815lab network: sg-vuln / sg-fixed

* **check** — exit 1 when the injected program executes, 0 when the guard

* **exploit** — narrated chain: attacker-controlled args → `--exec` on

`ls-remote` → attacker program runs on the host.

* **probe** — both `raw()` and `listRemote()` paths.

* **mitigation** — 4.1.0 / commit `c8ee6bb` / broadened `--exec` guard.

A standalone full-chain exploit ships at `exploit/exploit.py`:

python3 exploit/exploit.py --host=sg-vuln

# exit 1 on confirmed program execution, 0 on a safe target

| path | `sg-vuln` (4.0.0) | `sg-fixed` (4.1.0) |

| `raw('ls-remote', '--exec=...', 'origin')` | **marker created — program executed** | **`Use of --exec is not permitted without enabling allowUnsafePack`** |

| `listRemote(['--exec=...', 'origin'])` | marker created | same rejection |

Captured runs: `evidence/check-*-run.txt`, `evidence/exploit-*-run.txt`,

`evidence/probe-*-run.txt`, `evidence/mitigation-*-run.txt`,

`evidence/exploit-standalone-run.txt`, `evidence/exploit-standalone-fixed-run.txt`,

`evidence/versions.txt`, `evidence/0day-sweep.txt`.

* Podman (or Docker); bounded containers on the isolated `cve134815lab`

network; pinned npm packages and Git in the lab images.

* Real-world exploitation requires an application to pass attacker-influenced

strings into `listRemote()` or `raw()` on an affected simple-git version.

## 7. Additional findings (0-day sweep on the fixed line)

The guard now applies to `--exec` on `archive`, `ls-remote`, `fetch-pack` and

`send-pack` in addition to `push`; `rebase --exec` remains reachable only under

`allowUnsafeExec`. Commands without `--exec` continue to work on the fixed

build. No residual `--exec` channel was found on the fixed line in this sweep.

run-lab.sh environment driver (build / up / sweep / down)

Makefile convenience targets

poc/poc.py the PoC (check / exploit / probe / mitigation)

exploit/exploit.py standalone full-chain exploit

lab/harness.js attacker upload-pack marker + both API paths

lab/lab.Dockerfile builds both sides from pinned npm packages

lab/service.js HTTP wrapper (POST /git), child-process isolation

evidence/ captured runs of every mode on both sides

TRACKING.md excluded (working record)

* CVE record —

* GitHub advisory —

* Fix commit —

Extracted Entities