Gitpython Developers Gitpython vulnerabilities, page 2

42 vulnerabilities

Known vulnerabilities in Gitpython Developers Gitpython, newest first, with CVSS severity, EPSS, KEV listings, ransomware use and the affected versions.

PrioritiseCVE-2026-76218gitpython-developers · gitpython +11 moreGitPython before 3.1.58 Remote Code Execution via Repo.initGitPython before 3.1.58 contains a remote code execution vulnerability in Repo.init that forwards unsafe git options without validation. Attackers can supply a template parameter pointing to a directory with malicious git hooks that execute arbitrary code when git operations are performed on the initialized repository.CVSS8.8HighEPSS0.56%PrioritiseCVE-2026-76217gitpython-developers · gitpython +11 moreGitPython before 3.1.58 Arbitrary File Read via pathspec-from-fileGitPython versions before 3.1.58 fail to validate options passed to git rm and git checkout commands in IndexFile.remove() and Head.checkout(). Attackers can supply --pathspec-from-file and --pathspec-file-nul parameters to read arbitrary files accessible to the process, with full file contents returned in GitCommandError.stderr.CVSS7.1HighEPSS0.36%PrioritiseCVE-2026-73625gitpython-developers · gitpython +4 moreGitPython before 3.1.54 Remote Code Execution via kwarg value smugglingGitPython versions before 3.1.54 contain a remote code execution vulnerability in the check_unsafe_options guard that can be bypassed by smuggling git options inside single-character kwarg values. Attackers can supply crafted option dictionaries to clone_from, fetch, pull, push, ls_remote, iter_commits, blame, or archive methods to execute arbitrary OS commands via the --upload-pack parameter.CVSS8.8HighEPSS0.68%PrioritiseCVE-2026-73624gitpython-developers · gitpython +4 moreGitPython before 3.1.54 Arbitrary File Overwrite via diffGitPython versions before 3.1.54 contain an arbitrary file overwrite vulnerability in the Diffable.diff method that fails to validate git options passed through kwargs. Attackers can supply the --output argument via the other parameter or output kwarg to write patch content to attacker-chosen file paths at process privilege level.CVSS8.1HighEPSS0.35%PrioritiseCVE-2026-73623gitpython-developers · gitpython +4 moreGitPython before 3.1.54 Remote Code Execution via --templateGitPython before 3.1.54 contains an incomplete denylist in unsafe_git_clone_options that omits --template, allowing attackers to achieve arbitrary command execution during clone operations. Attackers can supply --template pointing to a directory containing malicious post-checkout hooks that execute when git clones the repository.CVSS8.8HighEPSS0.80%PrioritiseCVE-2026-73622gitpython-developers · gitpython +4 moreGitPython before 3.1.55 Environment Variable Exfiltration via Remote.add()GitPython before 3.1.55 fails to disable environment variable expansion in Remote.create() and Submodule.add() URL handling, allowing attackers to exfiltrate secrets by supplying URLs containing variable references. Attackers can craft URLs with environment variable tokens that are expanded into .git/config and .gitmodules, then transmitted to attacker-controlled hosts during fetch or pull operations.CVSS8.7HighEPSS0.37%RoutineCVE-2026-73621gitpython-developers · gitpython +4 moreGitPython before 3.1.56 Arbitrary File Truncation via Commit.countGitPython before 3.1.56 contains an argument injection vulnerability in the Commit.count() method, which forwards keyword arguments to 'git rev-list' without the check_unsafe_options guard present in the sibling iter_items method. An attacker who can control options passed to Commit.count (e.g., via an application that forwards a user-supplied options dict) can supply output=<path>, causing 'git rev-list --output=<path>' to open and truncate the target file to zero bytes before revision parsing. This allows destruction/blanking of an arbitrary file at the process's privilege level (no content control, 0-byte truncation).CVSS5.4MediumEPSS0.21%PrioritiseCVE-2026-73620gitpython-developers · gitpython +4 moreGitPython before 3.1.57 Arbitrary File Overwrite and ReadGitPython before 3.1.57 fails to guard git option forwarding in IndexFile.checkout() and TagReference.create(), allowing attackers to pass unsafe options via kwargs. Attackers can use --prefix to overwrite arbitrary files with repository content or -F to read arbitrary files returned in-band.CVSS8.1HighEPSS0.36%PrioritiseCVE-2026-73619gitpython-developers · gitpython +4 moreGitPython before 3.1.57 Arbitrary File Read via Repo.archive()GitPython before 3.1.57 contains an incomplete denylist in the unsafe_git_archive_options guard that omits --add-file and --add-virtual-file options. Attackers can supply these options to Repo.archive() to read arbitrary files from the filesystem and include them in the returned archive.CVSS7.1HighEPSS0.29%PrioritiseCVE-2026-69097gitpython-developers · gitpython +12 moreGitPython before 3.1.53 Config Injection via Submodule NamesGitPython before 3.1.53 fails to properly escape section names in git config files, allowing attackers to inject arbitrary configuration directives through malicious submodule names. Attackers can inject core.sshCommand or other dangerous config keys into the victim's .git/config via create_submodule or clone_from operations, achieving remote code execution when git performs ssh operations.CVSS7.3HighEPSS0.26%PrioritiseCVE-2026-67326gitpython-developers · gitpython +4 moreGitPython before 3.1.50 Newline Injection via config_writer sectionGitPython before 3.1.50 fails to validate newline characters in the section parameter of config_writer(), allowing attackers to inject arbitrary section headers into .git/config. Attackers can inject newlines to create a forged [core] section with hooksPath pointing to attacker-controlled directories, achieving remote code execution when git hooks are triggered.CVSS7.8HighEPSS0.43%PrioritiseCVE-2026-67324gitpython-developers · gitpython +4 moreGitPython 3.1.50 Authentication Bypass via Joined Short OptionsGitPython 3.1.50 fails to recognize joined short-option forms such as -u<value> (the short form of --upload-pack=<value>) when enforcing its default unsafe-option gate. When an application passes attacker-influenced clone options into Repo.clone_from(..., multi_options=..., allow_unsafe_options=False), an attacker can supply -u<helper> to bypass the gate that blocks --upload-pack/-u, causing Git to execute the specified helper command during clone. Fixed in 3.1.51.CVSS9.8CriticalEPSS0.45%PrioritiseCVE-2026-67323gitpython-developers · gitpython +12 moreGitPython before 3.1.51 Command Injection via unguarded Git optionsGitPython before 3.1.51 fails to guard against dangerous Git options passed as keyword arguments in Repo.archive() and git.ls_remote(), allowing command injection via options such as --exec/--upload-pack (leading to arbitrary command execution). Additionally, Repo.iter_commits() and Repo.blame() do not check for leading-dash revision arguments, so a revision like --output=<path> can cause Git to open and truncate an arbitrary file. Exploitation requires an application that passes attacker-controlled arguments to these methods.CVSS8.6HighEPSS1.25%PrioritiseCVE-2026-67322gitpython-developers · gitpython +13 moreGitPython before 3.1.52 Environment Variable Exfiltration via clone_fromGitPython before 3.1.52 is vulnerable to environment-variable exfiltration in Repo.clone_from(). The caller-supplied remote URL is passed through Git.polish_url(), which on non-Cygwin platforms calls os.path.expandvars() on the URL before invoking git clone. An attacker who controls the clone URL can embed $NAME or ${NAME} tokens that are expanded to the values of the hosting process's environment variables (e.g., AWS_SECRET_ACCESS_KEY or GITHUB_TOKEN). The resulting URL, now containing the secret, is transmitted over the network to an attacker-controlled host during the clone attempt, disclosing the secret.CVSS8.7HighEPSS0.33%PrioritiseCVE-2026-67325gitpython-developers · gitpython +12 moreGitPython before 3.1.51 Command Injection via option prefix abbreviationGitPython before 3.1.51 contains an incomplete command injection blocklist that fails to account for git's long-option prefix abbreviation feature. Attackers can bypass the unsafe options guard by using abbreviated option names like upload_p instead of upload_pack, which git resolves to dangerous options and executes arbitrary commands.CVSS8.8HighEPSS2.21%PrioritiseCVE-2026-44243gitpython-developers · gitpython +8 moreGitPython: Path traversal in GitPython reference APIs allows arbitrary file write and delete outside the repositoryGitPython is a python library used to interact with Git repositories. Prior to version 3.1.48, a vulnerability in GitPython allows attackers who can supply a crafted reference path to an application using GitPython to write, overwrite, move, or delete files outside the repository’s .git directory via insufficient validation of reference paths in reference creation, rename, and delete operations. This issue has been patched in version 3.1.48.CVSS7.8HighEPSS0.43%PrioritiseCVE-2026-44244gitpython-developers · gitpython +10 moreGitPython: Newline injection in config_writer().set_value() enables RCE via core.hooksPathGitPython is a python library used to interact with Git repositories. Prior to version 3.1.49, GitConfigParser.set_value() passes values to Python's configparser without validating for newlines. GitPython's own _write() converts embedded newlines into indented continuation lines (e.g. \n becomes \n\t), but Git still accepts an indented [core] stanza as a section header — so the injected core.hooksPath becomes effective configuration. Any Git operation that invokes hooks (commit, merge, checkout) will then execute scripts from the attacker-controlled path. This issue has been patched in version 3.1.49.CVSS7.8HighEPSS0.25%PrioritiseCVE-2026-42284gitpython-developers · gitpython +15 moreGitPython: Unsafe option check validates multi_options before shlex.split transforms itGitPython is a python library used to interact with Git repositories. Prior to version 3.1.47, _clone() validates multi_options as the original list, then executes shlex.split(" ".join(multi_options)). A string like "--branch main --config core.hooksPath=/x" passes validation (starts with --branch), but after split becomes ["--branch", "main", "--config", "core.hooksPath=/x"]. Git applies the config and executes attacker hooks during clone. This issue has been patched in version 3.1.47.CVSS9.8CriticalEPSS0.59%PrioritiseCVE-2026-42215gitpython-developers · gitpython +15 moreGitPython: Command injection via Git options bypassGitPython is a python library used to interact with Git repositories. From version 3.1.30 to before version 3.1.47, GitPython blocks dangerous Git options such as --upload-pack and --receive-pack by default, but the equivalent Python kwargs upload_pack and receive_pack bypass that check. If an application passes attacker-controlled kwargs into Repo.clone_from(), Remote.fetch(), Remote.pull(), or Remote.push(), this leads to arbitrary command execution even when allow_unsafe_options is left at its default value of False. This issue has been patched in version 3.1.47.CVSS8.8HighEPSS0.76%RoutineCVE-2024-22190gitpython-developers · gitpython +5 moreUntrusted search path under some conditions on Windows allows arbitrary code executionGitPython is a python library used to interact with Git repositories. There is an incomplete fix for CVE-2023-40590. On Windows, GitPython uses an untrusted search path if it uses a shell to run `git`, as well as when it runs `bash.exe` to interpret hooks. If either of those features are used on Windows, a malicious `git.exe` or `bash.exe` may be run from an untrusted repository. This issue has been patched in version 3.1.41.CVSS7.8HighEPSS0.32%