Skip to main content
VulnerabilityPublished

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

Affects GitPythonSource GCVE Database

0

CVSS 8.1 High : upgrade to 3.2.0 soon.

Data as of 27 Oct 2026, 17:27 UTC

CVSS 3.1 base score
8.1High
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 3.2.0
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

What to do

Upgrade GitPython to 3.2.0.

Affected software

ProductAffectedFixed in
PyPIGitPythonAffected
  • >=3.1.30 <3.2.0
Fixed in
  • 3.2.0

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A fix is available in GitPython version 3.2.0. Users should upgrade to this version or later to remediate the vulnerability. Until upgraded, avoid passing untrusted input as the refspec argument to Remote.pull().

Description

GitPython's Remote.pull() method improperly handles the positional refspec argument, allowing an attacker to inject a --upload-pack option that bypasses the unsafe-option guard. This leads to arbitrary command execution with the privileges of the calling process when using local-path or SSH transports. The vulnerability is fixed in version 3.2.0.

References

Community reviews

Loading reviews…