CVE-2026-73620 in GitPythoninfo

Summary

by MITRE • 08/13/2026

GitPython before 3.1.57 fails to guard git option forwarding in IndexFile.checkout() and TagReference.create(), allowing attackers to pass unsafe options via kwargs. Attackers can use --prefix to overwrite arbitrary files with repository content or -F to read arbitrary files returned in-band.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 08/13/2026

GitPython versions prior to 3.1.57 contain a critical security vulnerability in the IndexFile.checkout() and TagReference.create() methods that fails to properly sanitize user-supplied arguments passed through kwargs parameters. This flaw enables attackers to inject malicious git command options that can be executed with the privileges of the user running the GitPython application. The vulnerability stems from insufficient input validation and sanitization within the argument forwarding mechanism, allowing arbitrary command execution through crafted parameter values.

The technical implementation of this vulnerability exploits the lack of proper option filtering in GitPython's internal command execution pipeline. When attackers pass malicious arguments through kwargs to these methods, the system forwards them directly to underlying git commands without adequate sanitization. The --prefix option can be abused to specify arbitrary file paths that will be overwritten with content from the repository, while the -F option allows for reading arbitrary files from the filesystem and returning their contents in-band to the attacker. This creates a path traversal and information disclosure scenario that can be leveraged for privilege escalation and data exfiltration.

The operational impact of this vulnerability extends beyond simple command injection as it affects any application using GitPython for repository management operations. Attackers can exploit this weakness to overwrite critical system files, inject malicious content into repositories, or extract sensitive configuration data from the target environment. The vulnerability is particularly dangerous in automated deployment systems, continuous integration pipelines, and applications that process user-provided repository data without proper validation. Organizations running vulnerable versions may experience unauthorized access to source code repositories, potential privilege escalation, and compromise of development environments.

Security mitigations for this vulnerability require immediate upgrade to GitPython version 3.1.57 or later where proper input sanitization has been implemented. Organizations should also implement defensive coding practices such as validating all user-supplied arguments before passing them to git command execution methods, implementing strict option whitelisting, and monitoring for unusual file system operations in environments where GitPython is deployed. Additionally, security teams should conduct thorough code reviews of any custom implementations that use these vulnerable methods and consider implementing runtime protections such as privilege separation and sandboxing around git command execution. This vulnerability aligns with CWE-78 and CWE-20 categories related to improper input validation and command injection, and maps to ATT&CK techniques including TA0006 (Credential Access) and TA0005 (Defense Evasion) through unauthorized file access and system compromise.

Responsible

VulnCheck

Reservation

08/13/2026

Disclosure

08/13/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Might our Artificial Intelligence support you?

Check our Alexa App!