Skip to main content
← All vulnerabilities
CVE-2026-44244GHSA-V87R-6Q3F-2J67PYSEC-2026-2163

GitPython: Newline injection in config_writer().set_value() enables RCE via core.hooksPath

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

Summary

GitPython is a python library used to interact with Git repositories. Prior to version 3.1.49, GitConfigParser.set_value() passes values to Python's configparser without validating for newlines. GitPython's own _write() converts embedded newlines into indented continuation lines (e.g. \n becomes \n\t), but Git still accepts an indented [core] stanza as a section header — so the injected core.hooksPath becomes effective configuration. Any Git operation that invokes hooks (commit, merge, checkout) will then execute scripts from the attacker-controlled path. This issue has been patched in version 3.1.49.

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.49

  • gitpythonPyPI

    fixed in 3.1.49

References 2

GitHub · gitpython-developers/GitPython