Arbitrary Argument Injection Affecting gitpython package, versions [,3.2.0)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.39% (33rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-GITPYTHON-21692658
  • published24 Oct 2026
  • disclosed15 Oct 2026
  • creditMAXI8594

Introduced: 15 Oct 2026

NewCVE-2026-110859  (opens in a new tab)
CWE-88  (opens in a new tab)

How to fix?

Upgrade GitPython to version 3.2.0 or higher.

Overview

GitPython is a python library used to interact with Git repositories

Affected versions of this package are vulnerable to Arbitrary Argument Injection via Head.checkout() in git/refs/head.py, where the branch name passed as a positional argument reaches the git checkout argv without a -- separator and without being inspected by the unsafe-options guard. The guard at line 286 calls Git._option_candidates([], kwargs), checking only keyword arguments, so a branch named --pathspec-from-file=<path> is passed directly to git as an option. An attacker who controls a remote repository's default branch name can cause a consuming application that clones the repository and calls repo.active_branch.checkout() to disclose the full contents of any file readable by the process through the GitCommandError exception message.

Note: This is only exploitable when file contents are disclosed through lines that do not match any path in the repository.

References

CVSS Base Scores

version 4.0
version 3.1