Symlink Attack Affecting gitpython package, versions [3.1.62,3.2.0)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.13% (3rd percentile)

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-21246261
  • published19 Oct 2026
  • disclosed15 Oct 2026
  • creditdpfkdlemtp

Introduced: 15 Oct 2026

NewCVE-2026-110860  (opens in a new tab)
CWE-59  (opens in a new tab)

How to fix?

Upgrade GitPython to version 3.2.0 or higher.

Overview

GitPython is a python library used to interact with Git repositories

Affected versions of this package are vulnerable to Symlink Attack via Submodule.move() in git/objects/submodule/base.py, which validates the destination path only lexically using abspath(), commonpath(), and relpath(), without resolving or rejecting symbolic links in intermediate path components. An untrusted repository can commit a mode-120000 symlink (e.g., vendor -> ../outside) so that when an application calls submodule.move("vendor/module") with a fixed destination, the operating system resolves vendor through the attacker-committed symlink, relocating the submodule checkout to an external directory, rewriting .gitmodules and the index to the symlinked path, and leaving the index unable to produce a tree.

Note: This is only exploitable on systems where Git materializes tracked symlinks as real filesystem symlinks; on Windows this generally requires core.symlinks=true with Developer Mode or sufficient privilege, and the application must explicitly call Submodule.move() with a path beneath the attacker-committed symlink.

References

CVSS Base Scores

version 4.0
version 3.1