ADVISORIES

Ubuntu CVE Tracker

UBUNTU-CVE-2026-42215

Details

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.

Affected packages

EcosystemPackageAffected versions
Ubuntu:Pro:14.04:LTSpython-git
All versions before 0.3.2~RC1-3ubuntu0.1~esm3 (fixed in 0.3.2~RC1-3ubuntu0.1~esm3)
Ubuntu:Pro:16.04:LTSpython-git
All versions before 1.0.1+git137-gc8b8379-2.1ubuntu0.1~esm4 (fixed in 1.0.1+git137-gc8b8379-2.1ubuntu0.1~esm4)
Ubuntu:Pro:18.04:LTSpython-git
All versions before 2.1.8-1ubuntu0.1~esm4 (fixed in 2.1.8-1ubuntu0.1~esm4)
Ubuntu:Pro:20.04:LTSpython-git
All versions before 3.0.7-1ubuntu0.1~esm4 (fixed in 3.0.7-1ubuntu0.1~esm4)
Ubuntu:Pro:22.04:LTSpython-git
All versions before 3.1.24-1ubuntu0.1~esm3 (fixed in 3.1.24-1ubuntu0.1~esm3)
Ubuntu:Pro:24.04:LTSpython-git
All versions before 3.1.37-3ubuntu0.1~esm2 (fixed in 3.1.37-3ubuntu0.1~esm2)
Ubuntu:25.10python-git
All versions, no fix listed
Ubuntu:26.10python-git
All versions, no fix listed
Ubuntu:Pro:26.04:LTSpython-git
All versions before 3.1.46-1ubuntu0.1~esm1 (fixed in 3.1.46-1ubuntu0.1~esm1)

References