npm / simple-git
simple-git
What changed in simple-git 3 to 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-17.
12 breaking12 security3 new APIs and options3 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initsimple-git 416 changes
Breaking changes 9
Abbreviated long-form git options are no longer accepted and now throw a GitConfigurationError; use full option names.
Use this option to allow named environment variables through to the git child process; explicitly supplied disallowed variables throw when used.
Ambient environment variables are filtered before they are passed into the git child process.
The legacy gitP export was removed; use the main simpleGit export.
Parsed properties are available only through error.git; they are no longer spread onto the error itself when accessed through a trailing callback.
The deprecated import path was removed; use the main simple-git import.
The default export was removed; import the named simpleGit export instead.
The no-op clearQueue method was removed; switch to using the abort plugin.
The silent method was removed; logging is configured through environment variables in the debug package.
Security 4
simple-git unsafe-operation guard does not block trailer command configuration
Detection of allowUnsafeExec was added for rebase -x and rebase --exec.
simple-git allows command execution through unblocked Git configuration includes
simple-git: unsafe-operations plugin bypass via git long-option abbreviation (--receive-p/--exe) -> command execution (residual of CVE-2026-28291)
New APIs and options 2
VISUAL is now among the environment variables allowed by allowUnsafeEditor.
Supports one-shot stdin via git.input(data), where data can be a string or Buffer.
Fixes and other changes 1
Binary rename entries without byte counts are now parsed in diff summaries.
simple-git 314 changes
Breaking changes 3
simple-git now blocks this exploitable configuration key.
simple-git now blocks this per-task environment variable.
This type from argv-parser is removed in favor of a readonly array of Vulnerability.
Security 8
simple-git is vulnerable to Remote Code Execution
Remote and local paths passed to git.clone and git.mirror are wrapped with pathspec to avoid unexpected outcomes from unsanitised data.
Enhanced protocol.allow checks in allowUnsafeExtProtocol handling.
simple-git has blockUnsafeOperationsPlugin bypass via case-insensitive protocol.allow config key enables RCE
Unsafe switch detection for clone has been enhanced.
Fixes the regex for detecting unsafe clone options.
simple-git Affected by Command Execution via Option-Parsing Bypass
The unsafe plugin blocks additional cases where the -u switch is disguised alongside other single-character options.
New APIs and options 1
A new API provides simpler access to identified vulnerabilities.
Fixes and other changes 2
Checks for git -c were enhanced in the unsafe plugin.
Correctly identifies the current branch name in a cloned empty repository instead of reporting it as No.