All vulnerabilities

PyPI

CVE-2026-110858

GitPython Remote.pull() refspec bypasses the --upload-pack unsafe-option guard, enabling arbitrary command execution

Severity
High 8.1
Published
27 Oct 2026
Last changed
27 Oct 2026
Added to UpHeron
23 Nov 2026
Fixed in
3.2.0
Exploit chance
0.5% in the next 30 daysHigher than 40% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
OS command injection (CWE-78)Argument injection (CWE-88)
Attack
Over the network · Only under certain conditions · No login needed · No user action needed
Attacker can
Read data · Change data · Take it down
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Also known as
GHSA-f9j4-qggq-h239
Sources
OSV.dev and GitHub

Description

Remote.pull() in GitPython forwards its positional refspec argument directly to the git pull child process while its unsafe-option guard inspects only keyword arguments. An application that passes attacker-influenced data as the refspec (for example a user-supplied branch or refspec parameter in a web or CI service) can supply an option-shaped value such as --upload-pack=. The value bypasses the unsafe_git_pull_options check, is placed after the -- separator on the git pull command line, and is executed as the upload-pack program for local-path or SSH transports. This yields arbitrary command execution with the privileges of the calling process using the documented default arguments (allow_unsafe_options=False).

Remote.pull() is documented to reject dangerous options unless allow_unsafe_options=True, and --upload-pack is explicitly listed as such an option. The guard, however, only screens keyword arguments and never the positional refspec.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
gitpythonPyPI · osv:PyPI:gitpython
  • From 3.1.30 before 3.2.0

About gitpython

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

References