External Control of File Name or Path Affecting gitpython package, versions [,3.1.58)


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 Learn

Learn about External Control of File Name or Path vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-GITPYTHON-18592310
  • published8 Aug 2026
  • disclosed7 Aug 2026
  • credittinyb0y

Introduced: 7 Aug 2026

New CVE NOT AVAILABLE CWE-22  (opens in a new tab)
CWE-73  (opens in a new tab)

How to fix?

Upgrade GitPython to version 3.1.58 or higher.

Overview

GitPython is a python library used to interact with Git repositories

Affected versions of this package are vulnerable to External Control of File Name or Path via the handling of submodule names in the .gitmodules configuration. An attacker can cause arbitrary directories and Git repositories to be created outside the intended working tree by supplying a crafted submodule name containing directory traversal sequences. This can lead to unauthorized modification of the filesystem and potential disruption of system integrity when a victim clones a malicious repository and initializes submodules.

CVSS Base Scores

version 4.0
version 3.1