CVE-2026-42215
8.8gitpython-developers · GitPython
GitPython is vulnerable to OS command injection via attacker-controlled Python kwargs passed into repository methods, leading to arbitrary command execution.
Executive summary
An OS command injection vulnerability in GitPython allows low-privileged authenticated attackers to achieve arbitrary command execution, presenting a critical risk to dependent applications.
Vulnerability
This flaw is an OS Command Injection (CWE-78) where equivalent Python kwargs bypass default blocks on dangerous Git options. The attack requires low privileges, with the attacker passing untrusted kwargs into methods such as Repo.clone_from() or Remote.fetch() without user interaction.
Business impact
A successful exploit permits an attacker to execute arbitrary system commands within the context of the application hosting GitPython. This can lead to total system compromise, data theft, or lateral movement across the network. The high CVSS score of 8.8 reflects the severity of potential confidentiality, integrity, and availability impacts.
Remediation
Immediate Action: Update GitPython to version 3.1.47 or later immediately to patch the keyword argument validation flaw.
Proactive Monitoring: Monitor application logs for unusual child processes spawned by Python runtime environments or unexpected usage of Git operations involving remote repositories.
Compensating Controls: Implement strict input validation on all application parameters that are passed as keyword arguments into GitPython repository methods.
Exploitation status
Public Exploit Available: No — no confirmed weaponized exploit or public proof-of-concept exists in the curated tracking sources.
Analyst recommendation
Organizations utilizing GitPython in environments where user-supplied input flows into repository interaction methods must prioritize this advisory. Apply the vendor-supplied update to version 3.1.47 promptly to neutralize the command injection vector and secure dependent systems against potential exploitation.