REDHAT-BUG-2552966: High severity GitPython GitPython vulnerability
GitPython before 3.2.0 contains a remote code execution vulnerability that allows attackers to run commands because Git.lsremote forwards URLs without checkunsafeprotocols validation. Attackers can supply ext:: remote-helper URLs to execute commands when git permits the ext transport, while mergebase and IndexFile.move also accept unguarded option injection.
Affected Software
Event History
Frequently Asked Questions
Who is exposed to this issue?
Applications using GitPython before 3.2.0 are exposed where an attacker can influence a URL passed to Git.ls_remote or values passed to merge_base or IndexFile.move. Command execution through ext:: URLs also depends on the installed Git permitting the ext transport.
What does an attacker need to exploit the remote-code-execution path?
The attacker needs to be able to supply an ext:: remote-helper URL to Git.ls_remote. Exploitation succeeds when Git permits use of the ext transport.
Are default Git configurations affected by the ext:: URL attack?
The provided information does not establish whether Git permits the ext transport by default. The ext:: attack path is conditional on that transport being permitted.
What can be done before upgrading?
Do not allow untrusted users or inputs to control URLs supplied to Git.ls_remote, and reject ext:: remote-helper URLs. Also prevent untrusted values from reaching merge_base or IndexFile.move, because those methods accept unguarded option injection.