Input validation error in GitPython - CVE-2026-44244
Published: May 11, 2026
GitPython
gitpython-developers
Description
The vulnerability allows a local user to execute arbitrary code.
The vulnerability exists due to improper input validation in GitConfigParser.set_value() when writing user-supplied configuration values to .git/config. A local user can inject newline characters to create a malicious core.hooksPath setting and execute arbitrary code.
Any Git operation that invokes hooks, such as commit, merge, or checkout, may trigger execution from the attacker-controlled path. In shared repositories, the injected configuration can persist and affect subsequent Git operations by other users.