CVE-2026-78676

Critical

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.

SeverityCritical
CVSS9.8
Exploit probability—
ProductGitpython
PublishedAug 25, 2026
First seenAug 25, 2026
Weakness typeCWE-88CWE-88

How to fix

Update
  • gitpython_project gitpython3.1.59 or later
  • gitpython3.1.59 or later

Affected products

ProductAffected versionsFixed in
gitpython_project gitpythonv < 3.1.593.1.59
gitpythonPyPIv < 3.1.593.1.59

Check your version

Choose the product and enter the version you run to see whether it falls in the affected range.

In the Intelligence 360 plan

Attack Surface Management

See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.