GitPython: Remote code execution via argument injection in Remote.pull()
Summary
GitPython versions 3.1.30 up to, but not including, 3.2.0 contain a flaw in Remote.pull(). The guard against unsafe options only checks keyword arguments, not the positional refspec, so an attacker who controls the refspec can pass --upload-pack=<command>. This executes operating system commands with the privileges of the calling application. Exploitation requires that the pull uses a local-path or SSH transport and that the application passes attacker-influenced input as the refspec on the default code path.
Affected
- GitPython from 3.1.30 before 3.2.0
- Applications and containers that bundle a vulnerable GitPython version, including transitive dependencies
Fixed in
- Upgrade to GitPython 3.2.0 or later (vendor advisory GHSA-f9j4-qggq-h239)
Workaround
- No vendor-documented workaround. Upgrading is the vendor's recommendation.
- Do not pass user-supplied branch or refspec values to Remote.pull(). Validate them against an allow-list until patched (own recommendation, not from a vendor source).
Exploitation
- Public technical details exist in the GitHub advisory.
- CISA SSVC assessment: exploitation none, automatable no, technical impact total.
- No confirmed in-the-wild exploitation found. CISA KEV status not verified.
Our recommendation
- Inventory Python environments, containers and lockfiles for GitPython (for example with pip show gitpython).
- Upgrade to GitPython 3.2.0 or later and rebuild container images.
- Identify code paths that call Remote.pull() with user or external input and restrict them.
- Monitor the NVD record and the GHSA page for updates.
Public exploits
PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.
Research sources
- GitHub Security Advisory GHSA-f9j4-qggq-h239 github.com
- VulnCheck advisory CVE-2026-110858 www.vulncheck.com
- GitPython 3.2.0 release github.com
- OSV GHSA-f9j4-qggq-h239 osv.dev
- GitLab advisory database GHSA-f9j4-qggq-h239 advisories.gitlab.com
- Ubuntu security CVE-2026-110858 ubuntu.com
Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 31 Oct 2026, 04:24.
Original description (NVD)
GitPython from 3.1.30 before 3.2.0 contains a remote code execution vulnerability in Remote.pull() whose unsafe-option guard inspects only keyword arguments, not the positional refspec. Attackers controlling the refspec can supply --upload-pack=<command> to execute OS commands as the calling process over local-path or SSH transports.
Sources
The tracker combines official, freely usable data sources – updated continuously:
- NVD (NIST) – CVEs, rating (CVSS), affected products
- CISA KEV – vulnerabilities confirmed by CISA as actively exploited
- CISA Vulnrichment – CISA assessment (SSVC) in the official CVE record
- FIRST EPSS – probability of exploitation
- Microsoft MSRC – Patch Tuesday: vulnerabilities, severity, updates
- PoC-in-GitHub – public proof-of-concept repositories
- Metasploit (Rapid7) – modules of the Metasploit Framework
- Exploit-DB (OffSec) – archive of public exploits (links only)
- Patch days: official vendor pages (linked per vendor) (Vendor patch days)
This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.
Affected? We can help.
We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.
