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

- Priority: **Prioritise**
- Reason: Public exploit (GitHub, Date unknown)
- Next step: Check applicability: affected before 3.1.59 (CNA); fix release not confirmed
- Status: published
- Published: 2026-08-25 · Modified: 2026-10-08
- Aliases: GHSA-284h-m62q-gf8w, PYSEC-2026-3786, DEBIAN-CVE-2026-78676, CGA-5vmx-m8qc-h2c7, ALPINE-CVE-2026-78676
- Record: https://cvemate.com/vulnerability/CVE-2026-78676 · JSON: https://cvemate.com/vulnerability/CVE-2026-78676/json

## Description

```text
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.
```

## Signals

- CVSS: 9.8 critical (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.556%, percentile 47.808%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (github)

## Affected

- alpine py3-gitpython (Alpine Linux): \< 3.1.61-r0
- chainguard mlflow (Chainguard): \< 3.16.0-r0
- wolfi mlflow (Wolfi): \< 3.16.0-r0
- debian python-git (Debian): All versions (No fix recorded) \| \< 3.1.30-1+deb12u3 \| \< 3.1.44-1+deb13u1 \| \< 3.1.61-1
- gitpython\_project gitpython: \< 3.1.59
- gitpython-developers gitpython: \< 3.1.59
- PyPI gitpython (PyPI): \< 3.1.59

## References

- <https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-284h-m62q-gf8w>
- <https://www.vulncheck.com/advisories/gitpython-before-remote-code-execution-via-config-injection>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-78676>
- <https://github.com/gitpython-developers/GitPython>
- <https://github.com/pypa/advisory-database/tree/main/vulns/gitpython/PYSEC-2026-3786.yaml>
- <https://security-tracker.debian.org/tracker/CVE-2026-78676>
- <https://security.alpinelinux.org/vuln/CVE-2026-78676>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/78xxx/CVE-2026-78676.json>

---

Data as of 2026-12-05T04:47:04.248Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
