Skip to content
OpenAdvisories
High · 7.5 CVE-2026-114145 EUVD-2026-107557GHSA-83vg-56qc-22m7

GitPython validates a submodule's ".git" path only after cloning into it (RCE)

Published Oct 21, 2026 · Updated Oct 23, 2026 · Assigned by GitHub_M

Description

GitPython is a python library used to interact with Git repositories. Prior to 3.2.1, create_submodule() in git/objects/submodule/base.py accepts an attacker-influenced submodule path such as .git/hooks and invokes _clone_repo() before safely rejecting the destination. In 3.1.x, _validate_repo_path() does not exist and the call succeeds silently, while in 3.2.0 and later affected revisions the check in git/index/base.py raises ValueError only after the clone has written to disk and does not remove the planted file. An attacker-controlled submodule can therefore place an executable post-checkout hook that a later Git operation executes. Exploitation requires an application to accept an untrusted submodule path and a clone destination such as .git/hooks that is empty enough for Git to clone into it, which commonly means that default sample hooks are absent. This issue is fixed in version 3.2.1.

Affected products

VendorProductAffectedFixed
gitpython-developers GitPython < 3.2.1 —

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.2.1-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 —
Show 7 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 26.04 LTS python-git No fix yet —
Ubuntu Pro 24.04 LTS python-git No fix yet —
Ubuntu Pro 22.04 LTS python-git No fix yet —
Ubuntu Pro 20.04 LTS python-git No fix yet —
Ubuntu Pro 18.04 LTS python-git No fix yet —
Ubuntu Pro 16.04 LTS python-git No fix yet —
Ubuntu Pro 14.04 LTS python-git No fix yet —
ReleasePackageFixed inAdvisory
Red Hat Satellite Capsule 6 openvox-agent 8.31.1-1.el9sat RHSA-2026:95657, RHSA-2026:95656, RHSA-2026:95655
Red Hat Satellite Capsule 6 openvox-server 8.17.0-1.el9sat RHSA-2026:95657, RHSA-2026:95656, RHSA-2026:95655
Red Hat Satellite Capsule 6 python-brotli +1 1.2.1-1.el8pc RHSA-2026:95656, RHSA-2026:95655
Red Hat Satellite Capsule 6 python-django +1 4.2.30-2.el8pc RHSA-2026:95656, RHSA-2026:95655
Red Hat Satellite Capsule 6 python-gitpython +1 3.2.1-1.el8pc RHSA-2026:95656, RHSA-2026:95655
Red Hat Satellite Capsule 6 python-pillow +1 13.0.0-1.el8pc RHSA-2026:95656, RHSA-2026:95655
Red Hat Satellite Capsule 6 python-pyyaml +1 6.0.1-1.el8pc RHSA-2026:95655
Red Hat Satellite Capsule 6 python-urllib3 +1 2.8.0-1.el8pc RHSA-2026:95656, RHSA-2026:95655
Red Hat Satellite Capsule 6 python3.12-brotli 1.2.1-1.el9pc RHSA-2026:95657, RHSA-2026:92861
Red Hat Satellite Capsule 6 python3.12-django 4.2.30-3.el9pc RHSA-2026:95657, RHSA-2026:92861
Red Hat Satellite Capsule 6 python3.12-gitpython 3.2.1-1.el9pc RHSA-2026:95657, RHSA-2026:92861
Red Hat Satellite Capsule 6 python3.12-pillow 13.0.0-1.el9pc RHSA-2026:95657, RHSA-2026:92861
Red Hat Satellite Capsule 6 python3.12-pulp-ansible 1:0.28.10-1.el9pc RHSA-2026:92861
Red Hat Satellite Capsule 6 python3.12-urllib3 2.8.0-1.el9pc RHSA-2026:95657, RHSA-2026:92861
Red Hat Satellite 6 openvox-agent 8.31.1-1.el9sat RHSA-2026:95657, RHSA-2026:95656, RHSA-2026:95655
Red Hat Satellite 6 openvox-server 8.17.0-1.el9sat RHSA-2026:95657, RHSA-2026:95656, RHSA-2026:95655
Red Hat Satellite 6 python-brotli +1 1.2.1-1.el8pc RHSA-2026:95656, RHSA-2026:95655
Red Hat Satellite 6 python-django +1 4.2.30-2.el8pc RHSA-2026:95656, RHSA-2026:95655
Red Hat Satellite 6 python-gitpython +1 3.2.1-1.el8pc RHSA-2026:95656, RHSA-2026:95655
Red Hat Satellite 6 python-pillow +1 13.0.0-1.el8pc RHSA-2026:95656, RHSA-2026:95655
Red Hat Satellite 6 python-pyyaml +1 6.0.1-1.el8pc RHSA-2026:95655
Red Hat Satellite 6 python-urllib3 +1 2.8.0-1.el8pc RHSA-2026:95656, RHSA-2026:95655
Red Hat Satellite 6 python3.12-brotli 1.2.1-1.el9pc RHSA-2026:95657, RHSA-2026:92861
Red Hat Satellite 6 python3.12-django 4.2.30-3.el9pc RHSA-2026:95657, RHSA-2026:92861
Red Hat Satellite 6 python3.12-gitpython 3.2.1-1.el9pc RHSA-2026:95657, RHSA-2026:92861
Red Hat Satellite 6 python3.12-pillow 13.0.0-1.el9pc RHSA-2026:95657, RHSA-2026:92861
Red Hat Satellite 6 python3.12-pulp-ansible 1:0.28.10-1.el9pc RHSA-2026:92861
Red Hat Satellite 6 python3.12-urllib3 2.8.0-1.el9pc RHSA-2026:95657, RHSA-2026:92861
Red Hat Satellite 6 yggdrasil-worker-forwarder 0.1.1-1.el9sat RHSA-2026:92861
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python-GitPython 3.2.1-1.1 openSUSE-SU-2026:12391-1

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI gitpython < 3.2.1 3.2.1 GHSA-83vg-56qc-22m7

Advisories 5

References