Bug 2467802 (CVE-2026-42215)

Summary: CVE-2026-42215 GitPython: GitPython: Arbitrary command execution due to bypass of dangerous Git option checks
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: alinfoot, anthomas, bbrownin, cahl, derez, dfreiber, drow, dschmidt, dtrifiro, eglynn, ehelms, erezende, ggainey, jburrell, jdobes, jjoyce, jkoehler, jlanda, jmitchel, jpasqual, jpretori, jschluet, juwatts, kaycoth, kshier, lhh, ljawale, lphiri, luizcosta, mburns, mdellweg, mgarciac, mhulan, msilmser, nmoumoul, nweather, orabin, osousa, pcreech, rbobbitt, rbryant, rchan, rhel-process-autobot, rjohnson, sdawley, simaishi, smallamp, smcdonal, stcannon, teagle, tmalecek, vkumar, watson-tool-maintainers, weaton, yguenane
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A flaw was found in GitPython, a Python library used to interact with Git repositories. This vulnerability allows an attacker to achieve arbitrary command execution by providing specially crafted arguments (kwargs) to functions such as Repo.clone_from(), Remote.fetch(), Remote.pull(), or Remote.push(). This bypasses existing security checks designed to block dangerous Git options, enabling the execution of unauthorized commands.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2517357, 2517358    
Bug Blocks:    

Description OSIDB Bzimport 2026-05-07 19:01:53 UTC
GitPython is a python library used to interact with Git repositories. From version 3.1.30 to before version 3.1.47, GitPython blocks dangerous Git options such as --upload-pack and --receive-pack by default, but the equivalent Python kwargs upload_pack and receive_pack bypass that check. If an application passes attacker-controlled kwargs into Repo.clone_from(), Remote.fetch(), Remote.pull(), or Remote.push(), this leads to arbitrary command execution even when allow_unsafe_options is left at its default value of False. This issue has been patched in version 3.1.47.