REDHAT-BUG-2510032: High severity GitPython GitPython vulnerability
GitPython 3.1.50 fails to recognize joined short-option forms such as -u<value> (the short form of --upload-pack=<value>) when enforcing its default unsafe-option gate. When an application passes attacker-influenced clone options into Repo.clonefrom(..., multioptions=..., allowunsafeoptions=False), an attacker can supply -u<helper> to bypass the gate that blocks --upload-pack/-u, causing Git to execute the specified helper command during clone. Fixed in 3.1.51.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
GitPythonto a version that resolves this vulnerability.Fixed in 3.1.51 - Configuration
When calling Repo.clone_from(..., multi_options=..., allow_unsafe_options=False), ensure you use GitPython version fixed in 3.1.51 to prevent bypass via joined short-option forms like -u<value> (short form of --upload-pack=<value>).
GitPython Repo.clone_from allow_unsafe_options = False