gitpython
PyPI28 known CVEs affecting this package
Aggregated from OSV, GitHub Security Advisories, NVD, and vendor advisories. Each CVE links to its full detail page with vendor advisories, patches, fixed versions, and remediation guidance.
CVEs affecting gitpythonpage 1 of 1
- CVE-2022-24439HIGHCVSS 8.1EG 8.1✓ Fixed in 3.1.302022-12-06
vulnerable: 0.1.7 ... 3.1.9 (83 versions)
All versions of package gitpython are vulnerable to Remote Code Execution (RCE) due to improper user input validation, which makes it possible to inject a maliciously crafted remote URL into the clone command. Exploiting this vulnerability…
- CVE-2023-40267CRITICALCVSS 9.8EG 9.8✓ Fixed in 3.1.322023-08-11
vulnerable: 0.1.7 ... 3.1.9 (85 versions)
GitPython before 3.1.32 does not block insecure non-multi options in clone and clone_from. NOTE: this issue exists because of an incomplete fix for CVE-2022-24439.
- CVE-2023-40590HIGHCVSS 7.8EG 7.8✓ Fixed in 3.1.332023-08-28
vulnerable: 0.1.7 ... 3.1.9 (86 versions)
GitPython is a python library used to interact with Git repositories. When resolving a program, Python/Windows look for the current working directory, and after that the PATH environment. GitPython defaults to use the `git` command, if a …
- CVE-2023-41040MEDIUMCVSS 6.5EG 6.5✓ Fixed in 3.1.352023-08-30
vulnerable: 0.1.7 ... 3.1.9 (88 versions)
GitPython is a python library used to interact with Git repositories. In order to resolve some git references, GitPython reads files from the `.git` directory, in some places the name of the file being read is provided by the user, GitPyth…
- CVE-2024-22190HIGHCVSS 7.8EG 7.8✓ Fixed in 3.1.412024-01-11
vulnerable: 0.1.7 ... 3.1.9 (93 versions)
GitPython 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…
- CVE-2026-42215HIGHCVSS 8.8EG 8.8✓ Fixed in 3.1.472026-05-07
vulnerable: 3.1.30 ... 3.1.46 (16 versions)
GitPython 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 kwarg…
- CVE-2026-42284HIGHCVSS 8.1EG 8.1✓ Fixed in 3.1.472026-05-07
vulnerable: 0.1.7 ... 3.1.9 (99 versions)
GitPython 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…
- CVE-2026-44243HIGHCVSS 7.1EG 7.1✓ Fixed in 3.1.482026-05-07
vulnerable: 0.1.7 ... 3.1.9 (100 versions)
GitPython 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, mov…
- CVE-2026-44244HIGHCVSS 7.8EG 7.8✓ Fixed in 3.1.492026-05-07
vulnerable: 0.1.7 ... 3.1.9 (101 versions)
GitPython 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 n…
- CVE-2026-67322HIGHCVSS 7.5EG 7.5✓ Fixed in 3.1.522026-08-01
vulnerable: 0.1.7 ... 3.1.9 (104 versions)
GitPython 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 …
- CVE-2026-67323HIGHCVSS 8.4EG 8.4✓ Fixed in 3.1.512026-08-01
vulnerable: 0.1.7 ... 3.1.9 (103 versions)
GitPython 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 execu…
- CVE-2026-67324CRITICALCVSS 9.8EG 9.8✓ Fixed in 3.1.512026-08-01
vulnerable: 3.1.50
GitPython 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…
- CVE-2026-67325HIGHCVSS 8.8EG 8.8✓ Fixed in 3.1.512026-08-01
vulnerable: 0.1.7 ... 3.1.9 (103 versions)
GitPython 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…
- CVE-2026-67326HIGHCVSS 7.0EG 7.0✓ Fixed in 3.1.502026-08-01
vulnerable: 0.1.7 ... 3.1.9 (102 versions)
GitPython 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] sect…
- CVE-2026-69097HIGHCVSS 7.0EG 7.0✓ Fixed in 3.1.532026-08-03
vulnerable: 0.1.7 ... 3.1.9 (105 versions)
GitPython 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 …
- CVE-2026-73619MEDIUMCVSS 6.5EG 6.5✓ Fixed in 3.1.572026-08-13
vulnerable: 0.1.7 ... 3.1.9 (109 versions)
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 fil…
- CVE-2026-73620HIGHCVSS 8.1EG 8.1✓ Fixed in 3.1.572026-08-13
vulnerable: 0.1.7 ... 3.1.9 (109 versions)
GitPython 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 c…
- CVE-2026-73621MEDIUMCVSS 5.4EG 5.4✓ Fixed in 3.1.562026-08-13
vulnerable: 0.1.7 ... 3.1.9 (108 versions)
GitPython 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 attac…
- CVE-2026-73622HIGHCVSS 7.5EG 7.5✓ Fixed in 3.1.552026-08-13
vulnerable: 0.1.7 ... 3.1.9 (107 versions)
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 URL…
- CVE-2026-73623HIGHCVSS 7.5EG 7.5✓ Fixed in 3.1.542026-08-13
vulnerable: 0.1.7 ... 3.1.9 (106 versions)
GitPython 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 dir…
- CVE-2026-73624HIGHCVSS 8.1EG 8.1✓ Fixed in 3.1.542026-08-13
vulnerable: 0.1.7 ... 3.1.9 (106 versions)
GitPython 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 …
- CVE-2026-73625HIGHCVSS 8.8EG 8.8✓ Fixed in 3.1.542026-08-13
vulnerable: 0.1.7 ... 3.1.9 (106 versions)
GitPython 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 dictio…
- CVE-2026-76217MEDIUMCVSS 6.5EG 6.5✓ Fixed in 3.1.582026-08-19
vulnerable: 0.1.7 ... 3.1.9 (110 versions)
GitPython 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 …
- CVE-2026-76218HIGHCVSS 7.5EG 7.5✓ Fixed in 3.1.582026-08-19
vulnerable: 0.1.7 ... 3.1.9 (110 versions)
GitPython 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 execut…
- CVE-2026-76219HIGHCVSS 8.1EG 8.1✓ Fixed in 3.1.582026-08-19
vulnerable: 0.1.7 ... 3.1.9 (110 versions)
GitPython versions before 3.1.58 contain an arbitrary file overwrite vulnerability in IndexFile.from_tree, IndexFile.reset, and IndexFile.merge_tree methods that append caller-influenced treeish strings to git read-tree without option vali…
- CVE-2026-76220HIGHCVSS 8.8EG 8.8✓ Fixed in 3.1.582026-08-19
vulnerable: 0.1.7 ... 3.1.9 (110 versions)
GitPython before 3.1.58 contains a command execution vulnerability in the check_unsafe_options guard that can be bypassed by combining a single-character kwarg with split_single_char_options=False. Attackers can supply a crafted kwargs dic…
- CVE-2026-76221HIGHCVSS 8.8EG 8.8✓ Fixed in 3.1.582026-08-19
vulnerable: 0.1.7 ... 3.1.9 (110 versions)
GitPython before 3.1.58 contains a config-name injection vulnerability in the option-name validator that allows attackers to forge arbitrary git-config directives by injecting equals signs, hash symbols, and whitespace into option names. A…
- CVE-2026-76222HIGHCVSS 8.2EG 8.2✓ Fixed in 3.1.582026-08-19
vulnerable: 0.1.7 ... 3.1.9 (110 versions)
GitPython before 3.1.58 fails to validate submodule names from .gitmodules files, allowing attackers to create Git repositories at arbitrary filesystem paths outside the intended clone directory. Attackers can craft malicious repositories …
Check whether gitpython is used in your infrastructure
EchelonGraph scans your cloud and SBOMs to map every package to your actual deployments. See blast radius for gitpython CVEs against the assets you own.
Start Free Scan →