CVE-2026-67326

High

Description

GitPython before 3.1.50 fails to validate newline characters in the section parameter of config_writer(), allowing attackers to inject arbitrary section headers into .git/config. Attackers can inject newlines to create a forged [core] section with hooksPath pointing to attacker-controlled directories, achieving remote code execution when git hooks are triggered.

SeverityHigh
CVSS7.0
Exploit probability—
ProductGitpython
PublishedAug 1, 2026
First seenAug 1, 2026

How to fix

Update
  • gitpython_project gitpython3.1.50 or later
  • gitpython3.1.50 or later

Affected products

ProductAffected versionsFixed in
gitpython_project gitpythonv < 3.1.503.1.50
gitpythonPyPIv < 3.1.503.1.50

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.