GitPython before 3.1.54 contains an incomplete denylist in unsafe_git_clone_options that omits --template, allowing attackers to achieve arbitrary command execution during clone operations. Attackers can supply --template pointing to a directory containing malicious post-checkout hooks that execute when git clones the repository.
Fix
Patch, vendor advisory and mitigation references on NVD 2
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-6p8h-3wgx-97gf Exploit, Vendor Advisory
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-6p8h-3wgx-97gf Exploit, Vendor Advisory
Every line above is quoted from NVD, CISA, Microsoft, the vendor's own advisory or DISA; nothing is generated.
Change history 1
- First seenCVSS 7.7 · gitpython_projectNVD modified 2026-10-23 18:10
Affected (CPE criteria) 1
cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:python:*:*
References 3
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-6p8h-3wgx-97gf Exploit, Vendor Advisory
- https://www.vulncheck.com/advisories/gitpython-before-remote-code-execution-via-template Third Party Advisory
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-6p8h-3wgx-97gf Exploit, Vendor Advisory