Advisory

PYSEC-2026-3786

Also known as: CVE-2026-78676, GHSA-284h-m62q-gf8w

Summary

The record has no summary.

Details

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.

Severity

Not rated by the source.

Dates

Published
2026-08-25 02:16 UTC
Modified
2026-09-03 11:00 UTC

Affected packages and fixes

gitpython

PyPI · All systems

Affected

  • introduced 0, fixed 3.1.59 (ecosystem)

Fixed versions

3.1.59

Fix

  • Fixed version 3.1.59
    pip install --upgrade gitpython==3.1.59

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: PyPA Advisory Database · CC BY 4.0

Sources & licences