Quick answers
- Is This vulnerability exploited in the wild?
- No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
- How severe is This vulnerability?
- High severity, with a CVSS score of 8.2, published 19 August 2026.
- Which products and versions are affected?
- GitPython-developers GitPython <=3.1.57.
- Is there a fix for This vulnerability?
- A patch was published on 2026-08-04: Fix released in GitPython 3.1.58 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is This vulnerability attacked?
- It is attacked over the network, in a software library.
- Am I affected?
- Check whether anything you run is named in the advisory. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
Technical details
The vulnerability is a path traversal flaw (CWE-22) in GitPython's submodule handling. The root cause lies in src/GitPython/git/objects/submodule/util.py and src/GitPython/git/objects/submodule/base.py, where the sm_name() function extracts the submodule name from .gitmodules without validation. Unlike the submodule path (which is tree-validated), the name is used directly in Submodule._module_abspath() to construct the on-disk Git directory path via os.path.join(parent_repo.git_dir, "modules", name), which does not normalize path traversal sequences like "../". When submodule initialization is triggered (submodule_update(init=True)), this path is passed to os.makedirs() and git clone --separate-git-dir, creating a fully initialized Git repository at an attacker-controlled location outside the clone directory. The attack requires that a victim clone a malicious repository and run submodule initialization—a routine, often automatic operation in CI/CD pipelines. No authentication is required. The vulnerability is fixed in GitPython 3.1.58; prior versions up to 3.1.57 are affected.
Affected products
- GitPython-developers GitPython <=3.1.57
Timeline
- 2026-08-04: disclosed
- 2026-08-04: patched: Fix released in GitPython 3.1.58