All vulnerabilities
CVE-2026-100689GHSA-59cr-6r3x-644w

GitPython before 3.1.62 Path Traversal via gitmodules path

gitpython-developers GitPythonPyPILibraries & packages
CVSS
8.7High
ExploitationNo known exploitationNot in CISA KEV, which does not prove it is unexploitedCISA KEV
Exploit odds (EPSS)0.40%Chance of exploitation activity in the next 30 days, higher than 33% of CVEs. Scored 23 Oct 2026FIRST EPSS
Fixed in3.1.62Fixed versionCVE List
Published26 Sep 2026Updated 8 Oct 2026CVE List

What fixes it

  • 3.1.62GitPythonCVE List
  • 3.1.62gitpython, PyPIOSVpip install "gitpython>=3.1.62"

A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.

Description

GitPython before 3.1.62 does not validate the path field read from an untrusted .gitmodules file when updating submodules. While a prior fix (GHSA-hmq2-w58f-27jc) added Submodule._validated_name() to constrain the name field, and GitPython's own containment guard Submodule._to_relative_path() is applied in add() and move(), Submodule.update() derives the absolute checkout location from the raw path value without that guard. A .gitmodules entry containing directory traversal components (e.g., path = ../../../tmp/escaped) can therefore cause directories to be created via os.makedirs() outside the repository working tree, populated from the submodule URL on the clone path, and removed via shutil.rmtree() when force_remove is used. Exploitation requires an application flow that updates submodules at a non-HEAD commit (such as a historical-commit API); the common clone-then-update flow re-derives the path from a canonical tree lookup and is not affected. The issue is fixed in GitPython 3.1.62.

Text from CVE List

Affected versions 53

  • GitPythonaffected: all versions before 3.1.62CVE List
  • GitPythonunaffected: 3.1.62CVE List
  • gitpython, PyPIfrom first release, fixed in 3.1.62OSV
  • gitpython, PyPI0.1.7OSV
  • gitpython, PyPI0.2.0-beta1OSV
  • gitpython, PyPI0.3.0-beta1OSV
  • gitpython, PyPI0.3.0-beta2OSV
  • gitpython, PyPI0.3.1-beta2OSV
  • gitpython, PyPI0.3.2OSV
  • gitpython, PyPI0.3.2.1OSV
  • gitpython, PyPI0.3.2.RC1OSV
  • gitpython, PyPI0.3.3OSV
  • gitpython, PyPI0.3.4OSV
  • gitpython, PyPI0.3.5OSV
  • gitpython, PyPI0.3.6OSV
  • gitpython, PyPI0.3.7OSV
  • gitpython, PyPI1.0.0OSV
  • gitpython, PyPI1.0.1OSV
  • gitpython, PyPI1.0.2OSV
  • gitpython, PyPI2.0.0OSV
  • gitpython, PyPI2.0.1OSV
  • gitpython, PyPI2.0.2OSV
  • gitpython, PyPI2.0.3OSV
  • gitpython, PyPI2.0.4OSV
  • gitpython, PyPI2.0.5OSV
  • gitpython, PyPI2.0.6OSV
  • gitpython, PyPI2.0.7OSV
  • gitpython, PyPI2.0.8OSV
  • gitpython, PyPI2.0.9OSV
  • gitpython, PyPI2.0.9.dev0OSV
  • gitpython, PyPI2.0.9.dev1OSV
  • gitpython, PyPI2.1.0OSV
  • gitpython, PyPI2.1.1OSV
  • gitpython, PyPI2.1.10OSV
  • gitpython, PyPI2.1.11OSV
  • gitpython, PyPI2.1.12OSV
  • gitpython, PyPI2.1.13OSV
  • gitpython, PyPI2.1.14OSV
  • gitpython, PyPI2.1.15OSV
  • gitpython, PyPI2.1.2OSV
  • gitpython, PyPI2.1.3OSV
  • gitpython, PyPI2.1.4OSV
  • gitpython, PyPI2.1.5OSV
  • gitpython, PyPI2.1.6OSV
  • gitpython, PyPI2.1.7OSV
  • gitpython, PyPI2.1.8OSV
  • gitpython, PyPI2.1.9OSV
  • gitpython, PyPI3.0.0OSV
  • gitpython, PyPI3.0.1OSV
  • gitpython, PyPI3.0.2OSV
  • gitpython, PyPI3.0.3OSV
  • gitpython, PyPI3.0.4OSV
  • gitpython, PyPI3.0.5OSV

References 2