All vulnerabilities

PyPI

CVE-2026-110857

GitPython command wrappers omit unsafe protocol and option checks

Severity
High 7.5
Published
27 Oct 2026
Last changed
27 Oct 2026
Added to UpHeron
23 Nov 2026
Fixed in
3.2.0
Exploit chance
0.4% in the next 30 daysHigher than 36% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
CWE-1287
Attack
Over the network · Only under certain conditions · No login needed · Needs someone to click or open something
Attacker can
Read data · Change data · Take it down
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Also known as
GHSA-w8jc-g24h-crhw
Sources
OSV.dev and GitHub

Description

GitPython has spent 2022-2026 rolling out two reusable guards method-by-method: Git.check_unsafe_protocols(url) (raises UnsafeProtocolError for :: remote-helper URLs - CVE-2022-24439) and Git.check_unsafe_options(...) (raises UnsafeOptionError for denylisted option spellings - CVE-2023-40267, CVE-2026-42215, CVE-2026-67323). Three wrapper methods that build a git argv from caller-controlled values still have neither:

  • Git.ls_remote (git/cmd.py:1128-1143) - checks options (:1139-1141) but forwards the URL positional unchecked; no allow_unsafe_protocols parameter exists. The same URL through clone_from raises UnsafeProtocolError.
  • Repo.merge_base (git/repo/base.py:895-936) - forwards **kwargs/*rev to self.git.merge_base with no guard; guarded sibling iter_commits sits 12 lines up. Its exception handler additionally swallows every non-128 GitCommandError into [], masking the injection.
From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
gitpythonPyPI · osv:PyPI:gitpython
  • Every version before 3.2.0

About gitpython

Weekly downloads (PyPI)
34,365,891PyPI Stats, 23 Nov 2026

References