unstale

pypi / gitpython

gitpython

What changed in gitpython 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.

1 breaking36 security1 new APIs and options1 performance2 behavior and defaults24 fixes and other

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

npx @unstale/cli init

@unstale/cli on npm

gitpython 365 changes

Breaking changes 1

Security 36

  • Symbolic links that alias .gitmodules are rejected.

    3.2.1release notes

  • URL credentials are redacted without corrupting the host.

    3.2.1release notes

  • Safety checks in Git command wrappers are completed.

    3.2.0release notes

  • GitPython submodule update path traversal can write outside the repository

    3.1.62security advisory

  • Unsafe submodule checkout paths are rejected.

    3.1.62release notes

  • GitPython: Denial of Service via catastrophic backtracking (ReDoS) in Actor.name_email_regex — commit author/committer field parsing

    3.1.60security advisory

  • GitPython: --no-index bypasses diff unsafe-option protections and enables a blind local-file content oracle

    3.1.60security advisory

  • GitPython: Repository content can impersonate the git directory, leading to arbitrary code execution

    3.1.60security advisory

  • GitPython: Arbitrary local file content disclosure via [include] directive in untrusted .gitmodules (SubmoduleConfigParser never disables merge_includes)

    3.1.59security advisory

  • GitPython: clone_from()/clone() omit --separate-git-dir from unsafe_git_clone_options, enabling arbitrary git-directory creation outside the destination

    3.1.59security advisory

  • GitPython: Dormant multi-line git-config values are corrupted into live injected directives (e.g. core.hooksPath) on any unrelated GitConfigParser write, enabling RCE

    3.1.59security advisory

  • GitPython: Incomplete unsafe_git_revision_options denylist omits --contents/-S, enabling arbitrary file read via Repo.blame()

    3.1.59security advisory

  • GitPython: TagReference.create positional reference bypasses kwargs-only --file guard, enabling arbitrary file read (incomplete fix of 3af0c251)

    3.1.59security advisory

  • GitPython: Arbitrary file read via --pathspec-from-file in IndexFile.remove() and Head.checkout()

    3.1.58security advisory

  • GitPython: Arbitrary Git Repository Creation Outside the Working Tree via Unvalidated .gitmodules Submodule Name in GitPython

    3.1.58security advisory

  • GitPython: git-config OPTION-name injection via =/#/whitespace bypasses name validator, enabling forged core.sshCommand/hooksPath (RCE)

    3.1.58security advisory

  • GitPython: Unguarded git option forwarding in Repo.init enables arbitrary command execution via --template clone hooks

    3.1.58security advisory

  • GitPython: Unguarded git read-tree option forwarding in IndexFile.from_tree/reset/merge_tree enables arbitrary file overwrite

    3.1.58security advisory

  • GitPython: Unsafe git option guard bypass via split_single_char_options=False short-option token smuggling enables command execution

    3.1.58security advisory

  • GitPython: Incomplete unsafe_git_archive_options denylist omits --add-file / --add-virtual-file, enabling arbitrary file read via Repo.archive()

    3.1.57security advisory

  • GitPython: Unguarded git option forwarding in IndexFile.checkout() and TagReference.create() enables arbitrary file overwrite and arbitrary file read

    3.1.57security advisory

  • GitPython: Arbitrary file truncation via git rev-list --output argument injection in unguarded Commit.count

    3.1.56security advisory

  • GitPython: Environment-variable exfiltration via Repo.create_remote() / Remote.add() URL (incomplete fix of GHSA-rwj8-pgh3-r573)

    3.1.55security advisory

  • GitPython: Arbitrary file overwrite via git diff --output argument injection in Diffable.diff (key- and value-controlled)

    3.1.54security advisory

  • GitPython: Incomplete unsafe_git_clone_options denylist omits --template enabling arbitrary command execution via clone hooks

    3.1.54security advisory

  • GitPython: Unsafe git option guard bypass via single-character kwarg value token smuggling enables arbitrary command execution

    3.1.54security advisory

  • GitPython: git-config section-name injection enables arbitrary config directives (core.sshCommand RCE)

    3.1.53security advisory

  • GitPython: Environment-variable exfiltration via os.path.expandvars() on Repo.clone_from() URL

    3.1.52security advisory

  • GitPython: Command Injection via git long-option prefix abbreviation bypass of CVE-2026-42215 blocklist

    3.1.51security advisory

  • GitPython: command injection via unguarded Git options in Repo.archive(), git.ls_remote(), and arbitrary file overwrite via Repo.iter_commits() / Repo.blame()

    3.1.51security advisory

  • GitPython unsafe clone option gate bypass through joined short options

    3.1.51security advisory

  • GitPython: Newline injection in config_writer() section parameter bypasses CVE-2026-42215 patch, enabling RCE via core.hooksPath

    3.1.50security advisory

  • GitPython: Newline injection in config_writer().set_value() enables RCE via core.hooksPath

    3.1.49security advisory

  • GitPython reference APIs has a path traversal vulnerability that allows arbitrary file write and delete outside the repository

    3.1.48security advisory

  • GitPython has Command Injection via Git options bypass

    3.1.47security advisory

  • GitPython: Unsafe option check validates multi_options before shlex.split transformation

    3.1.47security advisory

New APIs and options 1

  • Submodule updates can be performed without fetching.

    3.2.0release notes

Performance 1

  • Accumulating gpgsig continuation lines now takes linear time.

    3.2.1release notes

Behavior and default changes 2

  • get_value reads Git's yes/no and on/off boolean values.

    3.2.0release notes

  • Worktrees created from bare repositories are kept non-bare.

    3.1.62release notes

Fixes and other changes 24

  • Byte modes are decoded before their digits are read.

    3.2.1release notes

  • Accepts a single PathLike in checkout.

    3.2.1release notes

  • Identity fields that alter commit headers are rejected.

    3.2.1release notes

  • Exact large integer values are preserved.

    3.2.1release notes

  • Whitespace in filenames is preserved in stats.

    3.2.1release notes

  • Each stdin record contains one object name or path.

    3.2.1release notes

  • Names are resolved independently of list attributes.

    3.2.1release notes

  • Lock files are created in one exclusive step.

    3.2.1release notes

  • Stalled remote commands are stopped when their timeout expires.

    3.2.1release notes

  • Destinations are validated before mutation.

    3.2.1release notes

  • Actor and date parsing is bounded.

    3.2.0release notes

  • Object types are validated when loading binary SHAs.

    3.2.0release notes

  • Checkout positional reference options are validated.

    3.2.0release notes

  • co_authors trailer parsing is bounded.

    3.2.0release notes

  • High-level Git commands preserve positional operands.

    3.2.0release notes

  • Git config name matching is case-insensitive.

    3.2.0release notes

  • Implicit boolean config keys are preserved, and comments after them are rejected.

    3.2.0release notes

  • Inline config comments are stripped the way Git does.

    3.2.0release notes

  • Option-line parsing is bounded.

    3.2.0release notes

  • Literal separate Git directory paths are preserved.

    3.2.0release notes

  • Submodule move destinations through intermediate symlinks are rejected.

    3.2.0release notes

  • Timeout child-process lookup works on non-GNU systems.

    3.2.0release notes

  • A UTF-8 BOM is skipped when reading config files.

    3.2.0release notes

  • Backslash line continuations are joined when reading config values.

    3.1.62release notes