CVE catalog

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

[CVE catalog]

Severity
Critical · CVSS 9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Published
Updated
Source
[NVD] · [CVE record]
EPSS
0.78% · Oct 25, 2026

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.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debianpython-gitsid3.2.1-1fixed
Debianpython-gitforky3.2.1-1fixed
Debianpython-gittrixie3.1.44-1vulnerable
Debianpython-gitbookworm3.1.30-1+deb12u2vulnerable
CpegitpythonNot reported3.1.59fixed
PyPIgitpythonNot reported3.1.59fixed
PipGitPythonNot reported3.1.59fixed
Opensusepython-GitPythontumbleweed3.1.59-3.1fixed

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debianpython-gitsourcesid3.1.61-1not yet assignedNot reported[1145672]
Debianpython-gitsourceforky3.1.61-1not yet assignedNot reported[1145672]
Debianpython-gitsourcetrixie(unfixed)not yet assignedNot reported[1145672]
Debianpython-gitsourcebookworm(unfixed)not yet assignedNot reported[1145672]
CpegitpythoncpeNot reported3.1.59Not reportedNVD-CVE-2026-78676Not reported
PyPIgitpythonPyPINot reported3.1.59Not reportedPYSEC-2026-3786Not reported
PipGitPythonpipNot reported3.1.59Not reportedGHSA-284H-M62Q-GF8WNot reported
Opensusepython-GitPythonrpmtumbleweed3.1.59-3.1Not reportedOPENSUSE-SU-2026:11615-1Not reported

[Debian bug #1145672]

OpenFactory catalog packages

[Debian 12 (Bookworm)]

  • [python3-git]Affected

    Source package: [python-git]

    Details (2)
    • 3.1.30-1+deb12u2 · all · bookworm

      Affected

      nvd · python-git · debian · bookworm; nvd · python-git · debian · 12

    • 3.1.30-1+deb12u2 · all · bookworm

      Affected

      nvd · python-git · debian · bookworm; nvd · python-git · debian · 12

  • [python-git-doc]Affected

    Source package: [python-git]

    Details (2)
    • 3.1.30-1+deb12u2 · all · bookworm

      Affected

      nvd · python-git · debian · bookworm; nvd · python-git · debian · 12

    • 3.1.30-1+deb12u2 · all · bookworm

      Affected

      nvd · python-git · debian · bookworm; nvd · python-git · debian · 12

[Debian 13 (Trixie)]

  • [python3-git]Affected

    Source package: [python-git]

    Details (2)
    • 3.1.44-1 · all · trixie

      Affected

      nvd · python-git · debian · 13

    • 3.1.44-1 · all · trixie

      Affected

      nvd · python-git · debian · 13

  • [python-git-doc]Affected

    Source package: [python-git]

    Details (2)
    • 3.1.44-1 · all · trixie

      Affected

      nvd · python-git · debian · 13

    • 3.1.44-1 · all · trixie

      Affected

      nvd · python-git · debian · 13

[openSUSE Tumbleweed]

  • Source package: [python-GitPython]

    Details (1)
    • 3.1.61-1.1 · noarch · tumbleweed

      Unknown · Fixed: 3.1.59-3.1

      Version impact unknown

      nvd · python-GitPython · opensuse · tumbleweed

  • Source package: [python-GitPython]

    Details (1)
    • 3.1.61-1.1 · noarch · tumbleweed

      Unknown · Fixed: 3.1.59-3.1

      Version impact unknown

      nvd · python-GitPython · opensuse · tumbleweed

Observed:

References