high7.5
CVE-2026-76218
GitPython before 3.1.58 contains a remote code execution vulnerability in Repo.init that forwards unsafe git options without validation.
Impact
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 execute arbitrary code when git operations are performed on the initialized repository.
Affected packages
| Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|
| pip | GitPython | <= 3.1.57 | 3.1.58 |
Affected products
| Vendor | Product | Affected versions |
|---|---|---|
| Gitpython Project | Gitpython | before 3.1.58 |
Weakness classification
References
- NVD record
- CVE.org record
- GitHub advisory
- https://github.com/advisories/GHSA-9rj7-rf2p-w77r
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-9rj7-rf2p-w77r
- https://github.com/gitpython-developers/GitPython/pull/2204
- https://github.com/gitpython-developers/GitPython/commit/d9ddb55bdc66
- https://github.com/gitpython-developers/GitPython/releases/tag/3.1.58
- https://nvd.nist.gov/vuln/detail/CVE-2026-76218
- https://www.vulncheck.com/advisories/gitpython-before-remote-code-execution-via-repo-init