CVE-2026-67325

GitPython · GitPython

GitPython is vulnerable to OS Command Injection via improper neutralization of special elements in option prefix abbreviations, allowing authenticated attackers to execute arbitrary commands.

Executive summary

A critical OS command injection vulnerability in GitPython allows authenticated attackers to execute arbitrary code on the underlying system.

Vulnerability

This vulnerability is an OS Command Injection (CWE-78) flaw triggered by improper handling of command-line arguments. It requires an authenticated user to provide malicious input that is subsequently processed by the library.

Business impact

Successful exploitation of this vulnerability allows an attacker to achieve full system compromise by executing arbitrary OS commands with the privileges of the application process. Given the CVSS score of 8.8, this represents a high risk to data confidentiality, integrity, and availability, potentially leading to unauthorized access to sensitive repository data or server environments.

Remediation

Immediate Action: Update the GitPython package to version 3.1.51 or later via your package manager.

Proactive Monitoring: Monitor system logs for unexpected child processes spawned by the application or unusual command-line arguments passed to Git-related functions.

Compensating Controls: Implement strict input validation or sanitization for all user-supplied data that interacts with Git commands to prevent the injection of malicious flags or arguments.

Exploitation status

Public Exploit Available: Unknown

Analyst recommendation

The high severity of this command injection vulnerability necessitates prompt action. Administrators should verify their current GitPython version and apply the 3.1.51 update immediately to eliminate the risk of arbitrary code execution.