CVE-2026-76218: GitPython before 3.1.58 Remote Code Execution via Repo.init
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 Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/python-gitto a version that resolves this vulnerability.Fixed in 3.1.30-1+deb12u3 - Upgrade
Upgrade
debian/python-gitto a version that resolves this vulnerability.Fixed in 3.1.44-1+deb13u1 - Upgrade
Upgrade
debian/python-gitto a version that resolves this vulnerability.Fixed in 3.1.61-1 - Upgrade
Upgrade
debian/python-gitto a version that resolves this vulnerability.Fixed in 3.1.30-1+deb12u3Fixed in 3.1.44-1+deb13u1Fixed in 3.2.1-1 - Upgrade
Upgrade
alpine/py3-gitpythonto a version that resolves this vulnerability.Fixed in 3.1.61-r0
Event History
Frequently Asked Questions
What level of attacker access and interaction does the CVSS assessment indicate?
The assessment indicates network reachability, low privileges, and no user interaction are required. It also rates attack complexity as high.