CVE-2026-110858: GitPython 3.1.30 before 3.2.0 Command Injection via Remote.pull() Refspec
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.
Affected Software
Event History
Frequently Asked Questions
Which deployments are realistically exposed?
Deployments using GitPython versions from 3.1.30 up to, but not including, 3.2.0 are exposed when they call Remote.pull() with a refspec influenced or controlled by an attacker. The issue can execute commands over local-path or SSH transports.
What does an attacker need to exploit this?
An attacker needs control of the positional refspec passed to Remote.pull(). They can provide an --upload-pack=<command> value, which is not inspected by the unsafe-option guard when supplied as the positional refspec.
What should be done if upgrading is not immediately possible?
Do not pass untrusted input as the positional refspec to Remote.pull(). Restrict refspec values to trusted, validated values and prevent option-like input such as --upload-pack=<command>.