# CVE-2026-100689: GitPython before 3.1.62 Path Traversal via gitmodules path

- Severity: High 8.7 (CVSS:4.0, scored by VulnCheck) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.40%, higher than 36% of CVEs (2026-12-01)
- Published: 2026-09-26T13:23:48.759Z
- Modified: 2026-10-08T15:21:59.548Z
- Also known as: GHSA-59cr-6r3x-644w
- Weaknesses: CWE-22, CWE-73
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: VulnCheck

## 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.

(As written by CVE List.)

## Affected

- gitpython-developers GitPython: before 3.1.62 (not affected: 3.1.62)
- gitpython (PyPI): before 3.1.62

## Every score

- VulnCheck: CVSS:4.0 8.7 High `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`
- VulnCheck: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L`
- GitHub: CVSS:4.0 Medium `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`

## References

- <https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-59cr-6r3x-644w> (vendor-advisory, web)
- <https://www.vulncheck.com/advisories/gitpython-before-3.1.62-path-traversal-via-gitmodules-path> (third-party-advisory)
- <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)

## Sources

- CVE List: [CVE-2026-100689](https://www.cve.org/CVERecord?id=CVE-2026-100689), CVE Terms of Use, modified 2026-10-08
- GitHub Advisory Database: [GHSA-59cr-6r3x-644w](https://github.com/advisories/GHSA-59cr-6r3x-644w), CC-BY-4.0, modified 2026-10-01
- NVD: [CVE-2026-100689](https://nvd.nist.gov/vuln/detail/CVE-2026-100689), Public domain, modified 2026-09-30

---

Page: https://cve.day/CVE-2026-100689 · Whole record: https://cve.day/CVE-2026-100689.json · Rebuilt by cve.day 2026-11-25T22:59:41.224Z
