Input validation error in GitPython - #VU131003

 

Input validation error in GitPython - #VU131003

Published: May 11, 2026


Vulnerability identifier: #VU131003
CSH Severity: Medium
CVSSv4.0: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U/U:Green
CVE-ID: N/A
CWE-ID: CWE-20
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vulnerable software:
GitPython
Software vendor:
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.


Remediation

Install security update from vendor's website.

External links