# CVE-2026-73623: GitPython unsafe_git_clone_options incomplete denylist in --template

Source: https://junglewise.ai/threats/cve-2026-73623-gitpython-unsafe-git-clone-options-incomplete-denylist-in  
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-73623 · Severity: high · CVSS 7.5 · Published 2026-08-13

GitPython is a Python library used by developers to interact with Git repositories programmatically. A flaw in its clone functionality allows attackers to execute arbitrary commands on systems that use GitPython to clone untrusted repositories. An attacker can exploit this by providing a specially crafted --template parameter pointing to a directory with malicious Git hooks that execute during the clone process, potentially compromising the integrity of systems relying on this library.

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-73623 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-73623 being exploited in the wild.

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

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

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

**How is CVE-2026-73623 attacked?** It is attacked over the network.

**Am I affected by CVE-2026-73623?** 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.54 or later

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


## Technical details

GitPython versions before 3.1.54 fail to properly validate the --template parameter in the unsafe_git_clone_options denylist within base.py (lines 145-152). The --template option in git clone copies hook files from a specified directory into the new repository and executes them (specifically the post-checkout hook) during checkout. An attacker with control over clone parameters can bypass the incomplete denylist by supplying --template pointing to an attacker-controlled or world-writable directory containing a malicious post-checkout hook. The vulnerability requires an attacker-readable directory with executable hooks, a realistic precondition on shared filesystems, upload directories, /tmp, or network paths. The fix involves adding --template to the unsafe_git_clone_options denylist and auditing for other hook/exec-influencing options. Patched in version 3.1.54.

## Affected products

- GitPython GitPython before 3.1.54

## Identifiers

- CVE-2026-73623
- GHSA-6p8h-3wgx-97gf
- PYSEC-2026-3952

## Timeline

- 2026-07-22: disclosed: GitHub Security Advisory GHSA-6p8h-3wgx-97gf published
- 2026-08-13: advisory: CVE-2026-73623 published on NVD
- 2026: patched: Fixed in GitPython 3.1.54

## References

- [https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-6p8h-3wgx-97gf](https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-6p8h-3wgx-97gf)
- [https://www.vulncheck.com/advisories/gitpython-before-remote-code-execution-via-template](https://www.vulncheck.com/advisories/gitpython-before-remote-code-execution-via-template)

## 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)
