Intel

AIKIDO-2026-650426

gitpython is vulnerable to Remote Code Execution (RCE)

Remote Code Execution (RCE)CVE-2026-78676 Published 2 days ago

93

Critical Risk

This Affects:

PYTHONgitpython
0.1.7 - 3.1.58
Fixed in 3.1.59
Are you affected? Scan for Free

TL;DR

GitConfigParser re-serializes multi-line git-config values without safely re-quoting them on write. A quoted value that contains embedded newlines can be rewritten as live directives such as core.hooksPath when any unrelated config write occurs. An untrusted crafted config in a repository GitPython writes to can then trigger git hooks and execute arbitrary code. The fix safely re-serializes multi-line values on write so embedded newlines cannot become injected directives.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your application uses GitPython to write git config in repositories that may contain untrusted config files.

Background info

gitpython is vulnerable to Remote Code Execution (RCE) in versions 0.1.7 - 3.1.58.

How to fix this

Upgrade the gitpython library to the patch version.