All vulnerabilities

PyPI

CVE-2026-110860

GitPython: Submodule.move() follows an attacker-committed intermediate symlink outside the worktree

Severity
Medium
Published
27 Oct 2026
Last changed
27 Oct 2026
Added to UpHeron
23 Nov 2026
Fixed in
3.2.0
Exploit chance
0.2% in the next 30 daysHigher than 8% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Path traversal (CWE-22)Link following (CWE-59)
Also known as
GHSA-gq48-pqfc-9p58
Sources
OSV.dev and GitHub

Description

GitPython's public Submodule.move() API verifies that its destination is lexically inside the parent repository, but it does not reject symbolic links in the destination's intermediate components before filesystem operations. On systems that check out Git symlinks, an untrusted repository can therefore redirect a fixed, application-selected move destination outside the parent worktree.

The reporter reproduced this on the latest release, GitPython 3.1.62, and current main. In the strict scenario, the repository commits vendor -> ../outside, while the consuming application independently passes the fixed literal vendor/module. Submodule.move() follows vendor, moves the initialized submodule checkout to outside/module, rewrites .gitmodules and the index to the symlinked path, and leaves the index unable to produce a tree.

The same result occurs when the committed symlink contains an absolute path to an external directory.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
gitpythonPyPI · osv:PyPI:gitpython
  • Every version before 3.2.0

About gitpython

Weekly downloads (PyPI)
34,365,891PyPI Stats, 23 Nov 2026

References