# CVE-2026-78676: GitPython before 3.1.59 Remote Code Execution via Config Injection

- Severity: Critical 9.3 (CVSS:4.0, scored by VulnCheck) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.56%, higher than 47% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-08-25T01:30:33.754Z
- Modified: 2026-10-12T15:10:00.207Z
- Also known as: GHSA-284h-m62q-gf8w, PYSEC-2026-3786
- Weaknesses: CWE-88, CWE-94
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total
- Assigned by: VulnCheck

## Description

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.

(As written by CVE List.)

## Affected

- gitpython-developers GitPython: before 3.1.59 (not affected: 3.1.59)
- gitpython (PyPI): before 3.1.59
- gitpython_project gitpython: before 3.1.59

## Every score

- VulnCheck: CVSS:4.0 9.3 Critical `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`
- VulnCheck: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:4.0 Critical `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`
- PyPA Advisory Database: CVSS:4.0 `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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X`

## References

- <https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-284h-m62q-gf8w> (exploit, evidence, mitigation, vendor-advisory, web)
- <https://www.vulncheck.com/advisories/gitpython-before-remote-code-execution-via-config-injection> (advisory, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-78676> (advisory)
- <https://github.com/gitpython-developers/GitPython> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/gitpython/PYSEC-2026-3786.yaml> (web)

## Sources

- CVE List: [CVE-2026-78676](https://www.cve.org/CVERecord?id=CVE-2026-78676), CVE Terms of Use, modified 2026-10-08
- GitHub Advisory Database: [GHSA-284h-m62q-gf8w](https://github.com/advisories/GHSA-284h-m62q-gf8w), CC-BY-4.0, modified 2026-09-08
- NVD: [CVE-2026-78676](https://nvd.nist.gov/vuln/detail/CVE-2026-78676), Public domain, modified 2026-10-12
- PyPA Advisory Database: [PYSEC-2026-3786](https://osv.dev/vulnerability/PYSEC-2026-3786), CC-BY-4.0, modified 2026-09-03

---

Page: https://cve.day/CVE-2026-78676 · Whole record: https://cve.day/CVE-2026-78676.json · Rebuilt by cve.day 2026-11-25T22:59:35.098Z
