Command Injection Affecting gitpython package, versions [3.1.30, 3.1.47)


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.75% (52nd 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 Learn

Learn about Command Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-GITPYTHON-16298057
  • published26 Apr 2026
  • disclosed25 Apr 2026
  • creditWes Ring

Introduced: 25 Apr 2026

CVE-2026-42215  (opens in a new tab)
CWE-78  (opens in a new tab)

How to fix?

Upgrade GitPython to version 3.1.47 or higher.

Overview

GitPython is a python library used to interact with Git repositories

Affected versions of this package are vulnerable to Command Injection via the upload_pack or receive_pack kwargs in the Repo.clone_from, Remote.fetch, Remote.pull, or Remote.push functions. An attacker can execute arbitrary commands on the host system by supplying malicious keyword arguments.

CVSS Base Scores

version 4.0
version 3.1