Skip to main content
← All vulnerabilities
CVE-2026-78676GHSA-284H-M62Q-GF8WPYSEC-2026-3786

GitPython before 3.1.59 Remote Code Execution via Config Injection

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

Summary

GitPython before 3.1.59 fails to safely re-serialize multi-line git-config values during write operations, corrupting dormant quoted values into injected directives like core.hooksPath. Attackers can craft config files with embedded newlines that become live git directives after any unrelated GitPython config write, enabling arbitrary code execution via hook invocation.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: yes · Technical impact: total

  3. Record last updated

Affected versions

  • gitpython-developers GitPython

    fixed in 3.1.59

  • gitpythonPyPI

    fixed in 3.1.59

References 2

GitHub · gitpython-developers/GitPython

vulncheck.com