CVE-2026-67326 PUBLISHED

GitPython before 3.1.50 Newline Injection via config_writer section

Assigner: VulnCheck
Reserved: 29.07.2026 Published: 01.08.2026 Updated: 01.08.2026

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.

Metrics

CVSS Vector: CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
CVSS Score: 7.3

Product Status

Vendor gitpython-developers
Product GitPython
Versions Default: unaffected
  • affected from 0 to 3.1.50 (excl.)
  • Version 3.1.50 is unaffected

Credits

  • aslein1413-sys reporter

References

Problem Types

  • Improper Input Validation CWE