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


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.23% (14th 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-19653599
  • published9 Sept 2026
  • disclosed9 Sept 2026
  • creditkokomaru167

Introduced: 9 Sep 2026

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

How to fix?

Upgrade GitPython to version 3.1.60 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 through the high-level diff API in git/diff.py and git/repo/base.py. An attacker can turn repo.index.diff(..., no_index=True) into a blind local-file content oracle by supplying --no-index together with attacker-chosen paths and an -I/--ignore-matching-lines pattern. This lets the child git process treat the supplied operands as arbitrary filesystem paths, exposing local file content through distinguishable success-or-error responses and allowing repeated queries to recover secrets readable by the process running GitPython.

CVSS Base Scores

version 4.0
version 3.1