Skip to main content
← All vulnerabilities
CVE-2026-67326PYSEC-2026-3980GHSA-MV93-W799-CJ2W

GitPython before 3.1.50 Newline Injection via config_writer section

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 3.1.50
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: no
  • Technical impact: total

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: no · Technical impact: total

  3. Record last updated

Affected versions

  • gitpython-developers GitPython

    fixed in 3.1.50

  • gitpythonPyPI

    fixed in 3.1.50

References 2

GitHub · gitpython-developers/GitPython

vulncheck.com