Two high-severity vulnerabilities in GitPython allowed attackers to bypass built-in safety checks and reach arbitrary command execution through Git operations. CVE-2026-42215 affects versions 3.1.30 through 3.1.46 and stems from GitPython validating blocked Git options before normalizing Python keyword arguments: values such as upload_pack could pass validation, then be converted into forbidden flags like --upload-pack when passed to Repo.clone_from(), Remote.fetch(), Remote.pull(), or Remote.push(). The flaw could let attacker-controlled input trigger command execution with the privileges of the Python process even when allow_unsafe_options=False.
A second flaw, CVE-2026-42284, affects GitPython before version 3.1.47 and involves unsafe handling of the multi_options parameter in _clone(). The library checked multi_options before later reprocessing it with shlex.split(" ".join(multi_options)), enabling crafted input to smuggle additional Git command-line arguments past validation. A string that appeared to be a valid branch selection could be split into separate options, including malicious configuration such as core.hooksPath, causing Git to execute attacker-controlled hooks during clone. Both issues were fixed in GitPython 3.1.47.

See affected versions and whether adversaries are exploiting it.
2 events from the most recent confirmed update back to the earliest known activity.
GitPython version 3.1.47 fixed the command injection issue involving unsafe Git option bypass as well as a separate flaw in _clone() where multi_options were validated before being reprocessed with shlex.split. The latter bug allowed attackers to smuggle additional Git options that could apply malicious configuration and trigger attacker-controlled hooks during clone.
A command execution vulnerability in GitPython was publicly disclosed, affecting versions 3.1.30 through 3.1.46. The flaw allowed dangerous Git options to bypass blocklist checks when supplied as Python keyword arguments that were later normalized into Git command-line flags.
See whether adversaries are exploiting this yet, and where the affected versions run in your environment.
3 references tracked. Mallory keeps watching after this page renders.
cvefeed.io
Open sourcecvefeed.io
Open sourcecvereports.com
Open sourceMap indicators from this story to your assets and identify affected systems in minutes.
Every observed campaign, victim, and pivot linked to actors named in this story.
Malware, exploits, and IOCs connected to the activity described here.
YARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Get matching new stories delivered to your team as they break — not the next morning.
Ask questions about this story and take action on the answers.