simple-git
4.1.0 · 16 Nov 2026MIT15.5M / weekRepositorynpmAtom feed
2.48.0 is the newest release of 2.x.
In short
5 fixed
Security
8 advisories affect 2.10.0; 3.36.0 fixes the others
- CriticalRemote code execution in simple-gitGHSA-9w5j-4mwv-2wj8 · 26 Jan 2023Fixed in 3.16.0
- Highsimple-git allows command execution through unblocked Git configuration includesGHSA-g4wm-2vf7-vfgr · 5 Oct 2026No fix yet
- Highsimple-git: unsafe-operations plugin bypass via git long-option abbreviation (--receive-p/--exe) -> command execution (residual of CVE-2026-28291)GHSA-858h-whjf-mvg5 · 5 Oct 2026No fix yet
- Highsimple-git is vulnerable to Remote Code ExecutionGHSA-hffm-xvc3-vprc · 25 Apr 2026Fixed in 3.36.0
- Highsimple-git Affected by Command Execution via Option-Parsing BypassGHSA-jcxm-m3jx-f287 · 13 Apr 2026Fixed in 3.32.0
3 more
- Highsimple-git vulnerable to Remote Code Execution when enabling the ext transport protocolGHSA-9p95-fxvg-qgq2 · 6 Dec 2022Fixed in 3.15.0
- HighCommand injection in simple-gitGHSA-28xr-mwxg-3qc8 · 2 Apr 2022Fixed in 3.5.0
- HighCommand injection in simple-gitGHSA-3f95-r44v-8mrg · 12 Mar 2022Fixed in 3.3.0
Release note
The section about simple-git of a note shared by several packages.
2.10.0 - trailing options in checkout, init, status, reset & bug-fix awaiting a non-task
git.checkoutnow supports both object and array forms of supplying trailing options.
import simpleGit from "simple-git";
await simpleGit().checkout("branch-name", ["--track", "remote/branch"]);
await simpleGit().checkout(["branch-name", "--track", "remote/branch"]);
await simpleGit().checkout({ "branch-name": null });git.initnow supports both object and array forms of supplying trailing options and now
parses the response to return an InitResult;
import simpleGit, { InitResult } from "simple-git";
const notSharedInit: InitResult = await simpleGit().init(false, [
"--shared=false",
]);
const notSharedBareInit: InitResult = await simpleGit().init([
"--bare",
"--shared=false",
]);
const sharedInit: InitResult = await simpleGit().init(false, {
"--shared": "true",
});
const sharedBareInit: InitResult = await simpleGit().init({
"--bare": null,
"--shared": "false",
});git.statusnow supports both object and array forms of supplying trailing options.
import simpleGit, { StatusResult } from "simple-git";
const repoStatus: StatusResult = await simpleGit().status();
const subDirStatus: StatusResult = await simpleGit().status(["--", "sub-dir"]);git.resetupgraded to the new task style and exports an enumResetModewith all supported
merge modes and now supports both object and array forms of supplying trailing options.
import simpleGit, { ResetMode } from "simple-git";
// git reset --hard
await simpleGit().reset(ResetMode.HARD);
// git reset --soft -- sub-dir
await simpleGit().reset(ResetMode.SOFT, ["--", "sub-dir"]);bug-fix: It should not be possible to await the
simpleGit()task runner, only the tasks it returns.
expect(simpleGit().then).toBeUndefined(); expect(simpleGit().init().then).toBe(expect.any(Function));
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.