CVE-2026-76218Published Aug 19, 2026 · Aug 19Updated Oct 28
GitPython before 3.1.58 Remote Code Execution via Repo.init
gitpython-developers GitPython
High7.7Fix available
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| gitpython PyPI |
|
|
Original description
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.
From the CVE record · VulnCheck
References
- github.com/gitpython-developers/GitPython/security/advisories/GHSA-9rj7-rf2p-w77rVendor advisory
- vulncheck.com/advisories/gitpython-before-remote-code-execution-via-repo-initAdvisory
- github.com/CVEProject/cvelistV5/tree/main/cves/2026/76xxx/CVE-2026-76218.json
- nvd.nist.gov/vuln/detail/CVE-2026-76218
- github.com/gitpython-developers/GitPython/pull/2204
- github.com/gitpython-developers/GitPython/commit/d9ddb55bdc66
- github.com/gitpython-developers/GitPython
- github.com/gitpython-developers/GitPython/releases/tag/3.1.58
- pypi.org/project/gitpython
- github.com/advisories/GHSA-9rj7-rf2p-w77r