CVE-2026-78676
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.
- CVSS 4.0
- 9.3
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N - CVSS 3.1
- 9.8
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - EPSS
- 0.8% chance of exploitation in the next 30 days; higher than 55% of CVEs (scores of 2026-10-25)
- CWE
- CWE-88
- Published
- Modified
- Record from
- the NVD, synced
Affected
- gitpython_project:gitpython
Packages (OSV)
| Advisory | Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|---|
| GHSA-284h-m62q-gf8w | PyPI | gitpython | <3.1.59 | 3.1.59 |
| PYSEC-2026-3786 | PyPI | gitpython | <3.1.59 | 3.1.59 |