high7.5
CVE-2026-78677
GitPython before 3.1.59 omits --separate-git-dir from unsafe_git_clone_options, allowing attackers to create arbitrary git directories outside the intended clo…
Impact
GitPython before 3.1.59 omits --separate-git-dir from unsafe_git_clone_options, allowing attackers to create arbitrary git directories outside the intended clone destination. Attackers can pass a separate_git_dir parameter to Repo.clone_from() or Repo.clone() to redirect repository metadata to an attacker-controlled filesystem path, enabling arbitrary directory creation and potential hook execution.
Affected packages
| Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|
| pip | GitPython | <= 3.1.58 | 3.1.59 |
Affected products
| Vendor | Product | Affected versions |
|---|---|---|
| Gitpython Project | Gitpython | before 3.1.59 |
Weakness classification
References
- NVD record
- CVE.org record
- GitHub advisory
- https://github.com/advisories/GHSA-8mcc-hrx5-hvxc
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-8mcc-hrx5-hvxc
- https://nvd.nist.gov/vuln/detail/CVE-2026-78677
- https://github.com/gitpython-developers/GitPython/pull/2210
- https://github.com/gitpython-developers/GitPython/commit/b68afff45af0f49e79a3e2d2162018986b37ad5d
- https://github.com/gitpython-developers/GitPython/releases/tag/3.1.59
- https://github.com/pypa/advisory-database/tree/main/vulns/gitpython/PYSEC-2026-3787.yaml
- https://www.vulncheck.com/advisories/gitpython-before-path-traversal-via-separate-git-dir