unstale

npm / simple-git

simple-git

What changed in simple-git 2 to 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

19 breaking19 security12 new APIs and options1 behavior and defaults4 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

simple-git 440 changes

Breaking changes 15

  • Now also covers difftool.<tool>.path, matching mergetool.<tool>.path under allowUnsafeMergeDriver.

    4.1.0release notes

  • Now also covers the git filter-branch options that run shell commands.

    4.1.0release notes

  • Now blocks gpg.ssh.defaultKeyCommand.

    4.1.0release notes

  • Now blocks --exec for every command other than rebase, including push, send-pack, fetch-pack, archive --remote, and ls-remote.

    4.1.0release notes

  • When recommended checks are enabled, supplying a .env() value different from process.env requires allowUnsafeConfigPaths or naming the variable in allowEnvironment; passing through the inherited value is unaffected.

    4.1.0release notes

  • Unlisted configuration keys emit a one-off warning unless strict mode rejects them.

    4.1.0release notes

  • Abbreviated long-form git options are no longer accepted and now throw a GitConfigurationError; use full option names.

    4.0.0release notes

  • Use this option to allow named environment variables through to the git child process; explicitly supplied disallowed variables throw when used.

    4.0.0release notes

  • Ambient environment variables are filtered before they are passed into the git child process.

    4.0.0release notes

  • The legacy gitP export was removed; use the main simpleGit export.

    4.0.0release notes

  • Parsed properties are available only through error.git; they are no longer spread onto the error itself when accessed through a trailing callback.

    4.0.0release notes

  • The deprecated import path was removed; use the main simple-git import.

    4.0.0release notes

  • The default export was removed; import the named simpleGit export instead.

    4.0.0release notes

  • The no-op clearQueue method was removed; switch to using the abort plugin.

    4.0.0release notes

  • The silent method was removed; logging is configured through environment variables in the debug package.

    4.0.0release notes

Security 11

  • Allows individually permitting environment variables; it also replaces the deprecated unsafe options that only covered environment variables.

    4.1.0release notes

  • With recommended checks or strict mode, also covers configuration settings ending in .cmd or command.

    4.1.0release notes

  • Blocks git config --rename-section and git config rename-section, which could move keys from a harmless section into one that runs commands.

    4.1.0release notes

  • Introduced as a deprecated-on-arrival option covering listed sendemail.* and imap.* command, file, and certificate-verification settings; prefer allowConfig.

    4.1.0release notes

  • Runs commands written as tagged template literals, treating each interpolated value as untrusted data that cannot add options, set configuration keys, or select a remote helper transport.

    4.1.0release notes

  • Enables strict controls for Git-impacting environment variables and Git configuration writes, and implies unsafe.recommended.

    4.1.0release notes

  • Enables checks using broader catch-all rules, defaults to false, is implied by strict: true, and is planned to default to true in the next major version.

    4.1.0release notes

  • simple-git unsafe-operation guard does not block trailer command configuration

    4.0.1security advisory

  • Detection of allowUnsafeExec was added for rebase -x and rebase --exec.

    4.0.0release notes

  • simple-git allows command execution through unblocked Git configuration includes

    4.0.0security advisory

  • simple-git: unsafe-operations plugin bypass via git long-option abbreviation (--receive-p/--exe) -> command execution (residual of CVE-2026-28291)

    4.0.0security advisory

New APIs and options 11

  • Allows individually permitting configuration keys outside the built-in safe list; unlisted keys otherwise emit a one-off warning or are rejected in strict mode.

    4.1.0release notes

  • Introduced as a deprecated-on-arrival option covering browser and man-viewer path and command keys; prefer allowConfig.

    4.1.0release notes

  • Introduced as a deprecated-on-arrival option covering signature trust settings; prefer allowConfig.

    4.1.0release notes

  • Introduced as a deprecated-on-arrival option covering instaweb.httpd, instaweb.modulePath, and instaweb.gitwebDir; prefer allowConfig.

    4.1.0release notes

  • Exported from @simple-git/argv-parser to identify environment variables that simple-git removes from an inherited environment.

    4.1.0release notes

  • Accepts the inherited environment as an optional second argument, used to compare HOME and XDG_CONFIG_HOME against.

    4.1.0release notes

  • Provides a value wrapper for stricter validation of interpolated values passed to git.cmd.

    4.1.0release notes

  • Reported vulnerabilities now carry a level of default for explicitly identified risks or recommended for risks caught by a catch-all rule.

    4.1.0release notes

  • The vulnerability level type is exported.

    4.1.0release notes

  • VISUAL is now among the environment variables allowed by allowUnsafeEditor.

    4.0.2release notes

  • Supports one-shot stdin via git.input(data), where data can be a string or Buffer.

    4.0.0release notes

Behavior and default changes 1

  • Now covers custom binaries used by git grep --open-files-in-pager and interactive.diffFilter, which pipes diffs from patch commands through a shell command.

    4.1.0release notes

Fixes and other changes 2

  • The custom binary may contain spaces when it looks like a file path, provided it includes a path separator and no path part starts or ends with a space.

    4.1.0release notes

  • Binary rename entries without byte counts are now parsed in diff summaries.

    4.0.0release notes

simple-git 314 changes

Breaking changes 3

  • simple-git now blocks this exploitable configuration key.

    3.36.0release notes

  • simple-git now blocks this per-task environment variable.

    3.36.0release notes

  • This type from argv-parser is removed in favor of a readonly array of Vulnerability.

    3.36.0release notes

Security 8

  • simple-git is vulnerable to Remote Code Execution

    3.36.0security advisory

  • Remote and local paths passed to git.clone and git.mirror are wrapped with pathspec to avoid unexpected outcomes from unsanitised data.

    3.33.0release notes

  • Enhanced protocol.allow checks in allowUnsafeExtProtocol handling.

    3.32.3release notes

  • simple-git has blockUnsafeOperationsPlugin bypass via case-insensitive protocol.allow config key enables RCE

    3.32.3security advisory

  • Unsafe switch detection for clone has been enhanced.

    3.32.2release notes

  • Fixes the regex for detecting unsafe clone options.

    3.32.1release notes

  • simple-git Affected by Command Execution via Option-Parsing Bypass

    3.32.0security advisory

  • The unsafe plugin blocks additional cases where the -u switch is disguised alongside other single-character options.

    3.32.0release notes

New APIs and options 1

  • A new API provides simpler access to identified vulnerabilities.

    3.36.0release notes

Fixes and other changes 2

  • Checks for git -c were enhanced in the unsafe plugin.

    3.33.0release notes

  • Correctly identifies the current branch name in a cloned empty repository instead of reporting it as No.

    3.30.0release notes

simple-git 21 changes

Breaking changes 1

  • git.log now uses strict ISO dates by default; set strictDate to false to restore the previous ISO-like format.

    2.0.0release notes