PYSEC-2026-3980

At a glance

Published
Updated
CVE
CVE-2026-67326
Aliases
GHSA-mv93-w799-cj2w
CVSS_V3
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

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.

Affected packages

PackageVersions
PyPI · gitpythonintroduced 0, fixed 3.1.50

References

Sources

SourceLicence
OSV.devCC-BY 4.0 — PyPA Advisory Database