Skip to content
OpenAdvisories
High · 8.1 CVE-2026-42284 EUVD-2026-28412GHSA-x2qx-6953-8485PYSEC-2026-2161

GitPython: Unsafe option check validates multi_options before shlex.split transforms it

Published May 7, 2026 · Updated May 9, 2026 · Assigned by GitHub_M

Description

GitPython is a python library used to interact with Git repositories. Prior to version 3.1.47, _clone() validates multi_options as the original list, then executes shlex.split(" ".join(multi_options)). A string like "--branch main --config core.hooksPath=/x" passes validation (starts with --branch), but after split becomes ["--branch", "main", "--config", "core.hooksPath=/x"]. Git applies the config and executes attacker hooks during clone. This issue has been patched in version 3.1.47.

Affected products

VendorProductAffectedFixed
gitpython-developers GitPython < 3.1.47 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 python-git 3.1.50-1 —
Debian 13 python-git 3.1.44-1+deb13u1 —
Debian 12 python-git 3.1.30-1+deb12u3 —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 python-git No fix yet —
Ubuntu 25.10 python-git No fix yet —
Show 7 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 26.04 LTS python-git 3.1.46-1ubuntu0.1~esm1 USN-8303-1
Ubuntu Pro 24.04 LTS python-git 3.1.37-3ubuntu0.1~esm2 USN-8303-1
Ubuntu Pro 22.04 LTS python-git 3.1.24-1ubuntu0.1~esm3 USN-8303-1
Ubuntu Pro 20.04 LTS python-git 3.0.7-1ubuntu0.1~esm4 USN-8303-1
Ubuntu Pro 18.04 LTS python-git 2.1.8-1ubuntu0.1~esm4 USN-8303-1
Ubuntu Pro 16.04 LTS python-git 1.0.1+git137-gc8b8379-2.1ubuntu0.1~esm4 USN-8303-1
Ubuntu Pro 14.04 LTS python-git 0.3.2~RC1-3ubuntu0.1~esm3 USN-8303-1
ReleasePackageFixed inAdvisory
Red Hat Satellite Utils 6 foreman +1 3.12.0.23-1.el8sat RHSA-2026:74506, RHSA-2026:74505, RHSA-2026:74504
Red Hat Satellite Utils 6 rubygem-hammer_cli 3.12.0-2.el8sat RHSA-2026:74506, RHSA-2026:74505, RHSA-2026:74504
Red Hat Satellite Utils 6 rubygem-jwt 2.10.3-1.el9sat RHSA-2026:63385
Red Hat Satellite Utils 6 satellite +1 6.16.14-1.el8sat RHSA-2026:74506, RHSA-2026:74505, RHSA-2026:74504
Red Hat Satellite Maintenance 6 ansible-core 1:2.16.19-1.el9sat RHSA-2026:63385
Red Hat Satellite Capsule 6 ansible-core +1 1:2.16.19-1.el9sat RHSA-2026:63385
Red Hat Satellite Capsule 6 foreman +2 3.12.0.23-1.el8sat RHSA-2026:74506, RHSA-2026:74505, RHSA-2026:74504
Red Hat Satellite Capsule 6 openvox-server 8.15.2-1.el9sat RHSA-2026:63385
Red Hat Satellite Capsule 6 pulpcore-obsolete-packages 1.3.1-6.el9pc RHSA-2026:74504
Red Hat Satellite Capsule 6 python-dynaconf +1 3.2.13-1.el8pc RHSA-2026:74506, RHSA-2026:74505
Red Hat Satellite Capsule 6 python-gitpython +1 3.1.62-1.el8pc RHSA-2026:74506, RHSA-2026:74505
Red Hat Satellite Capsule 6 python-lxml +1 4.9.2-5.el8pc RHSA-2026:74506, RHSA-2026:74505
Red Hat Satellite Capsule 6 python-pulpcore +1 3.49.39-4.el8pc RHSA-2026:74506
Red Hat Satellite Capsule 6 python-sqlparse +1 0.6.0-1.el8pc RHSA-2026:74506, RHSA-2026:74505
Red Hat Satellite Capsule 6 python3.12-aiohttp 3.14.3-1.el9pc RHSA-2026:63385
Red Hat Satellite Capsule 6 python3.12-dynaconf 3.2.13-2.el9pc RHSA-2026:74504
Red Hat Satellite Capsule 6 python3.12-gitpython 3.1.59-1.el9pc RHSA-2026:74504, RHSA-2026:63385
Red Hat Satellite Capsule 6 python3.12-sqlparse 0.6.0-1.el9pc RHSA-2026:74504
Red Hat Satellite Capsule 6 rubygem-jwt 2.10.3-1.el9sat RHSA-2026:63385
Red Hat Satellite Capsule 6 satellite +2 6.16.14-1.el8sat RHSA-2026:74506, RHSA-2026:74505, RHSA-2026:74504
Red Hat Satellite Capsule 6 satellite-obsolete-packages 6.17.12-1.el9sat RHSA-2026:74505, RHSA-2026:74504
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Red Hat Satellite 6 ansible-core +1 1:2.16.19-1.el9sat RHSA-2026:63385
Red Hat Satellite 6 foreman +14 3.12.0.23-1.el8sat RHSA-2026:74506, RHSA-2026:74505, RHSA-2026:74504
Red Hat Satellite 6 openvox-server 8.15.2-1.el9sat RHSA-2026:63385
Red Hat Satellite 6 pulpcore-obsolete-packages 1.3.1-6.el9pc RHSA-2026:74504
Red Hat Satellite 6 python-dynaconf +1 3.2.13-1.el8pc RHSA-2026:74506, RHSA-2026:74505
Red Hat Satellite 6 python-gitpython +1 3.1.62-1.el8pc RHSA-2026:74506, RHSA-2026:74505
Red Hat Satellite 6 python-lxml +1 4.9.2-5.el8pc RHSA-2026:74506, RHSA-2026:74505
Red Hat Satellite 6 python-pulpcore +1 3.49.39-4.el8pc RHSA-2026:74506
Red Hat Satellite 6 python-sqlparse +1 0.6.0-1.el8pc RHSA-2026:74506, RHSA-2026:74505
Red Hat Satellite 6 python3.12-aiohttp 3.14.3-1.el9pc RHSA-2026:63385
Red Hat Satellite 6 python3.12-dynaconf 3.2.13-2.el9pc RHSA-2026:74504
Red Hat Satellite 6 python3.12-gitpython 3.1.59-1.el9pc RHSA-2026:74504, RHSA-2026:63385
Red Hat Satellite 6 python3.12-sqlparse 0.6.0-1.el9pc RHSA-2026:74504
Red Hat Satellite 6 rubygem-foreman_remote_execution +1 13.2.8-2.el8sat RHSA-2026:74506, RHSA-2026:74505, RHSA-2026:74504
Red Hat Satellite 6 rubygem-hammer_cli 3.12.0-2.el8sat RHSA-2026:74506, RHSA-2026:74505, RHSA-2026:74504
Red Hat Satellite 6 rubygem-jwt 2.10.3-1.el9sat RHSA-2026:63385
Red Hat Satellite 6 rubygem-katello 4.14.0.23-1.el8sat RHSA-2026:74506, RHSA-2026:74505, RHSA-2026:74504
Red Hat Satellite 6 rubygem-safemode 1.5.0-2.el8sat RHSA-2026:74506, RHSA-2026:74505, RHSA-2026:74504
Red Hat Satellite 6 satellite +2 6.16.14-1.el8sat RHSA-2026:74506, RHSA-2026:74505, RHSA-2026:74504
Red Hat Satellite 6 satellite-obsolete-packages 6.17.12-1.el9sat RHSA-2026:74505, RHSA-2026:74504
Red Hat Satellite 6 yggdrasil-worker-forwarder 0.1.0-2.el8sat RHSA-2026:74506, RHSA-2026:74505, RHSA-2026:74504
Red Hat Ansible Automation Platform Inside 2 ansible-core 1:2.16.19-1.el8ap RHSA-2026:42079, RHSA-2026:42078
Red Hat Ansible Automation Platform Inside 2 receptor +1 1.6.6-1.el8ap RHSA-2026:42079, RHSA-2026:42078
Red Hat Ansible Automation Platform Developer 2 ansible-core 1:2.16.19-1.el8ap RHSA-2026:42079, RHSA-2026:42078
Red Hat Ansible Automation Platform Developer 2 automation-controller +1 4.6.30-2.el8ap RHSA-2026:42078
Red Hat Ansible Automation Platform Developer 2 python3.12-urllib3 2.7.0-1.el8ap RHSA-2026:42078
Red Hat Ansible Automation Platform Developer 2 receptor +1 1.6.6-1.el8ap RHSA-2026:42079, RHSA-2026:42078
Red Hat Ansible Automation Platform 2 ansible-core +1 1:2.16.19-1.el8ap RHSA-2026:42079, RHSA-2026:42078
Red Hat Ansible Automation Platform 2 automation-controller +4 4.6.30-2.el8ap RHSA-2026:42079, RHSA-2026:42078
Red Hat Ansible Automation Platform 2 automation-eda-controller +4 1.1.20-1.el8ap RHSA-2026:42078
Red Hat Ansible Automation Platform 2 automation-gateway +2 2.5.20260715-1.el8ap RHSA-2026:42078
Red Hat Ansible Automation Platform 2 automation-gateway-proxy +1 2.6.17-1.el9ap RHSA-2026:42079
Red Hat Ansible Automation Platform 2 automation-hub +1 4.10.16-1.el8ap RHSA-2026:42078
Red Hat Ansible Automation Platform 2 automation-platform-ui 2.6.11-1.el9ap RHSA-2026:42079
Red Hat Ansible Automation Platform 2 python3.12-gitpython 3.1.50-1.el8ap RHSA-2026:42079, RHSA-2026:42078
Red Hat Ansible Automation Platform 2 python3.12-pulp-ansible 1:0.25.6-1.el8ap RHSA-2026:42078
Red Hat Ansible Automation Platform 2 python3.12-pulp-container 2.19.12-1.el8ap RHSA-2026:42078
Red Hat Ansible Automation Platform 2 python3.12-pulpcore 3.49.63-2.el8ap RHSA-2026:42079, RHSA-2026:42078
Red Hat Ansible Automation Platform 2 python3.12-pyjwt +1 2.13.0-1.el8ap RHSA-2026:42078
Red Hat Ansible Automation Platform 2 python3.12-pysequoia 0.1.34-1.el8ap RHSA-2026:42078
Red Hat Ansible Automation Platform 2 python3.12-urllib3 2.7.0-1.el8ap RHSA-2026:42078
Red Hat Ansible Automation Platform 2 receptor +1 1.6.6-1.el8ap RHSA-2026:42079, RHSA-2026:42078
ReleasePackageFixed inAdvisory
SLES 15 SP6 python-GitPython 3.1.34.1693646983.2a2ae77-150400.9.8.1 SUSE-SU-2026:4072-1
SLES 15 SP5 python-GitPython 3.1.34.1693646983.2a2ae77-150400.9.8.1 SUSE-SU-2026:4072-1
SLES 15 SP4 python-GitPython 3.1.34.1693646983.2a2ae77-150400.9.8.1 SUSE-SU-2026:4072-1
SLES 3 python-GitPython 3.1.34.1693646983.2a2ae77-150400.9.8.1 SUSE-SU-2026:4072-1
Show 5 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 15 SP6 python-GitPython 3.1.34.1693646983.2a2ae77-150400.9.8.1 SUSE-SU-2026:4072-1
SLES for SAP 15 SP5 python-GitPython 3.1.34.1693646983.2a2ae77-150400.9.8.1 SUSE-SU-2026:4072-1
SLES for SAP 15 SP4 python-GitPython 3.1.34.1693646983.2a2ae77-150400.9.8.1 SUSE-SU-2026:4072-1
SLE HPC 15 SP5 python-GitPython 3.1.34.1693646983.2a2ae77-150400.9.8.1 SUSE-SU-2026:4072-1
SLE HPC 15 SP4 python-GitPython 3.1.34.1693646983.2a2ae77-150400.9.8.1 SUSE-SU-2026:4072-1
ReleasePackageFixed inAdvisory
Alpine v3.24 py3-gitpython 3.1.49-r0 —
Alpine v3.23 py3-gitpython 3.1.49-r0 —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling checkov 3.2.525-r0 —
Wolfi rolling open-webui 0.8.12-r4 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI gitpython < 3.1.47 3.1.47 GHSA-x2qx-6953-8485

Advisories 9

References