Incomplete List of Disallowed Inputs Affecting gitpython package, versions [,3.1.51)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

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-18170133
  • published22 Jul 2026
  • disclosed21 Jul 2026
  • credithackkim, abhiprd2000

Introduced: 21 Jul 2026

New CVE NOT AVAILABLE CWE-184  (opens in a new tab)
CWE-78  (opens in a new tab)

How to fix?

Upgrade GitPython to version 3.1.51 or higher.

Overview

GitPython is a python library used to interact with Git repositories

Affected versions of this package are vulnerable to Incomplete List of Disallowed Inputs through Git.check_unsafe_options in git/cmd.py. An attacker can execute arbitrary commands by supplying abbreviated unsafe option names such as upload_p in a clone, fetch, pull, or push call, causing GitPython’s exact-match blocklist to miss the option and pass it to Git as a dangerous long-option prefix. This can run attacker-controlled programs like --upload-pack or --receive-pack under the caller’s process, leading to remote code execution in applications that forward user-controlled keyword names into GitPython operations.

Notes

  • Git’s unsafe-option guard is only exercised when the host application forwards user-controlled keyword names into clone, fetch, pull, or push; fixed call sites that pass literal option names are not exposed by this variant.
  • The bypass hinges on Git’s long-option prefix parsing, so abbreviated spellings like upload_p can be interpreted as blocked command-executing options even when the exact unsafe name is not used.

CVSS Base Scores

version 4.0
version 3.1