CVE-2026-67326

GitPython before 3.1.50 Newline Injection via config_writer section

State
Published
Severity
7.3 High
Published
Aug 1, 2026
Updated
Aug 14, 2026
Reserved
Jul 29, 2026

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
4.07.3 HighCVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NVulnCheck
3.17.0 HighCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:HVulnCheck

Weaknesses

  • CWE-20 Improper Input Validation

Affected Products

ProductVersions
GitPythongitpython-developers
  • before 3.1.50Affected
  • 3.1.50Not affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.