CVE-2026-100689
HIGH 8.7CVSS 4.0GitPython submodule update path traversal can write outside the repository
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.
- Published
- 26 Sep 2026
- Last modified
- 1 Oct 2026
- Assigned by
- disclosure@vulncheck.com
- NVD status
- Awaiting Analysis
- Weakness
- CWE-22CWE-73
- Also known as
- GHSA-59cr-6r3x-644w
- Sources
- NVDJSONOSV GHSA-59cr-6r3x-644wJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | disclosure@vulncheck.com (Secondary) | CVSS 4.0 | HIGH 8.7 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:P/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N | |
| NVD | disclosure@vulncheck.com (Secondary) | CVSS 3.1 | MEDIUM 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | PyPI | gitpython | < 3.1.62 | 3.1.62 |
References
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-59cr-6r3x-644w · WEB
- https://www.vulncheck.com/advisories/gitpython-before-3.1.62-path-traversal-via-gitmodules-path
- https://github.com/gitpython-developers/GitPython/pull/2225 · WEB
- https://github.com/gitpython-developers/GitPython/commit/1ed0ebc2f2e74d979cdc367a4864a7731fdcc093 · WEB
- https://github.com/gitpython-developers/GitPython · PACKAGE
- https://github.com/gitpython-developers/GitPython/releases/tag/3.1.62 · WEB
History
- 25 Nov 2026 21:21 UTC · NVD: first stored (published 26 Sep 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 30 Sep 2026)