REDHAT-BUG-2515243: High severity GitPython GitPython vulnerability
GitPython versions before 3.1.54 contain an arbitrary file overwrite vulnerability in the Diffable.diff method that fails to validate git options passed through kwargs. Attackers can supply the --output argument via the other parameter or output kwarg to write patch content to attacker-chosen file paths at process privilege level.
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.54
Event History
Frequently Asked Questions
Which deployments are exposed to this issue?
Deployments using GitPython versions before 3.1.54 are affected if untrusted input can influence the git options passed to Diffable.diff through kwargs, including the other parameter or output keyword argument.
What does an attacker need to exploit it?
An attacker needs the ability to supply git options to Diffable.diff via the affected kwargs. They can provide the --output option and choose a file path to receive patch content.
What is the impact of successful exploitation?
Successful exploitation can overwrite attacker-chosen files with patch content. The write occurs with the privilege level of the process running GitPython.
How can I determine whether an application is affected?
Check whether it uses a GitPython version earlier than 3.1.54 and whether Diffable.diff is called with kwargs that can be influenced by untrusted input, particularly other or output.