ADVISORIES

PyPA Advisory Database

PYSEC-2026-3784

Details

GitPython before 3.1.58 fails to validate submodule names from .gitmodules files, allowing attackers to create Git repositories at arbitrary filesystem paths outside the intended clone directory. Attackers can craft malicious repositories with traversal sequences in submodule names that GitPython processes during submodule initialization, creating attacker-controlled Git repositories at escaped filesystem locations.

Affected packages

EcosystemPackageAffected versions
PyPIgitpython
All versions before 3.1.58 (fixed in 3.1.58)

References