Input validation error in GitPython - #VU131003
Published: May 11, 2026
GitPython
gitpython-developers
Description
The vulnerability allows a remote attacker to execute arbitrary code.
The vulnerability exists due to improper input validation in config_writer() and set_value() in git/config.py when processing a crafted section parameter containing newline characters. A remote attacker can supply a crafted section name to inject arbitrary section headers into .git/config and execute arbitrary code.
User interaction is required to trigger a git hook after the malicious configuration is written.