# CVE-2026-73620: GitPython unguarded git option forwarding in IndexFile.checkout() and TagReference.create()

Source: https://junglewise.ai/threats/cve-2026-73620-gitpython-unguarded-git-option-forwarding-in-indexfile-checkout  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-13. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-73620 · Severity: high · CVSS 8.1 · Published 2026-08-13

GitPython is a widely-used library that enables Python applications to interact with Git repositories. The library fails to validate dangerous command-line options passed through certain methods, allowing attackers with repository access to overwrite arbitrary files on the system or read sensitive files. An attacker can commit malicious files to a repository and use specially crafted method parameters to achieve file write/read operations outside the repository directory.

Technologies: [Gitpython Project Gitpython](https://junglewise.ai/threats/technologies/gitpython), [gitpython (PyPI)](https://junglewise.ai/threats/technologies/pypi-gitpython). Vendors: [Gitpython Project](https://junglewise.ai/threats/vendors/gitpython-project), [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-73620 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-73620 being exploited in the wild.

**How severe is CVE-2026-73620?** High severity, with a CVSS score of 8.1, published 13 August 2026.

**Which products and versions are affected?** gitpython (PyPI) ECOSYSTEM:introduced=0,fixed=3.1.57.

**Is there a fix for CVE-2026-73620?** Yes. gitpython (PyPI): upgrade to 3.1.57 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-73620 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-73620?** Check whether you run Gitpython Project Gitpython or gitpython (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- gitpython (PyPI): upgrade to 3.1.57 or later

  ```sh
  pip install "gitpython>=3.1.57"
  ```


## Technical details

GitPython blocks dangerous git options via Git.check_unsafe_options(), but this guard is inconsistently applied across the codebase. IndexFile.checkout() and TagReference.create() forward **kwargs directly to git commands without validation. IndexFile.checkout() forwards unguarded options to git checkout-index, allowing the --prefix flag to write repository content to arbitrary filesystem paths with full attacker control over both destination and content. TagReference.create() forwards unguarded options to git tag, allowing the -F flag to read arbitrary files and return their contents in-band via the tag message. Both require authentication (PR branch access or repository clone), but impact is high: file overwrites enable code execution via authorized_keys/.bashrc/.git/hooks injection, and arbitrary file reads expose sensitive data. Patches are available in version 3.1.57 and later.

## Affected products

- GitPython GitPython before 3.1.57

## Identifiers

- CVE-2026-73620
- GHSA-3f7w-8rr8-f37f
- PYSEC-2026-3949

## Timeline

- 2026-07-26: disclosed
- 2026-08-13: advisory: CVE-2026-73620 published
- 2026-07-26: patched: Fixed in version 3.1.57

## References

- [https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-3f7w-8rr8-f37f](https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-3f7w-8rr8-f37f)
- [https://www.vulncheck.com/advisories/gitpython-before-arbitrary-file-overwrite-and-read](https://www.vulncheck.com/advisories/gitpython-before-arbitrary-file-overwrite-and-read)

## Related threats

- [GitPython command wrappers omit unsafe protocol and option checks](https://junglewise.ai/threats/cve-2026-110857-gitpython-command-wrappers-omit-unsafe-protocol-and-option)
- [GitPython submodule path traversal to arbitrary hook execution](https://junglewise.ai/threats/cve-2026-114145-gitpython-is-a-python-library-used-to-interact-with-git)
- [GitPython symlink following in Submodule.move()](https://junglewise.ai/threats/cve-2026-110860-gitpython-from-3-1-62-before-3-2-0-contains-a-symlink-following)
- [GitPython argument injection in Head.checkout()](https://junglewise.ai/threats/cve-2026-110859-gitpython-before-3-2-0-contains-an-argument-injection)
- [GitPython remote code execution in Remote.pull() refspec argument](https://junglewise.ai/threats/cve-2026-110858-gitpython-from-3-1-30-before-3-2-0-contains-a-remote-code)
