GitPython before 3.1.59 fails to safely re-serialize multi-line git-config values during write operations, corrupting dormant quoted values into injected directives like core.hooksPath. Attackers can craft config files with embedded newlines that become live git directives after any unrelated GitPython config write, enabling arbitrary code execution via hook invocation.
Fix
Patch, vendor advisory and mitigation references on NVD 1
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-284h-m62q-gf8w Exploit, Vendor Advisory, Mitigation
Every line above is quoted from NVD, CISA, Microsoft, the vendor's own advisory or DISA; nothing is generated.
Change history 1
- First seenCVSS 9.3 · gitpython_projectNVD modified 2026-10-12 15:10
Affected (CPE criteria) 1
cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:python:*:*
References 2
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-284h-m62q-gf8w Exploit, Vendor Advisory, Mitigation
- https://www.vulncheck.com/advisories/gitpython-before-remote-code-execution-via-config-injection Third Party Advisory