Kimi cli: GitPython submodule update path traversal can write outside the repository (CVE-2026-100689)
Description
A path traversal vulnerability exists in GitPython 3.1.61 and main branch in the handling of the .gitmodules 'path' field during submodule update operations. The 'update()' method validates only the submodule name but does not apply the existing containment guard to the 'path' field, allowing an attacker-controlled path with directory traversal components to cause directory creation and file operations outside the intended repository directory. This vulnerability requires a non-HEAD commit to be specified, limiting common usage impact. A fix is available that applies the containment guard to the 'path' field during update.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
GitPython versions 3.1.61 and main branch contain a path traversal vulnerability in the submodule update functionality. While the submodule name is validated to prevent traversal, the 'path' field from the .gitmodules file is used without applying the existing _to_relative_path containment guard. This allows an attacker to specify a path with '../' components, causing os.makedirs() and subsequent operations to affect directories outside the repository working tree. The vulnerability is mitigated in typical clone flows because real git refuses to check out trees with '..' components, but it can be triggered when updating submodules at non-HEAD commits via API calls. The recommended fix is to apply the containment guard to the 'path' field wherever it is consumed, preventing directory traversal. This vulnerability is distinct from a prior fix (GHSA-hmq2-w58f-27jc) which only addressed the submodule name.
Potential Impact
An attacker able to supply a crafted .gitmodules file with a malicious 'path' value containing directory traversal sequences can cause GitPython to create directories and write files outside the repository working tree during submodule update operations. This could lead to unauthorized file system modifications outside the intended repository scope. However, the vulnerability requires the victim's code to update submodules at a non-HEAD commit, which is not the common usage pattern, limiting the practical impact. There are no known exploits in the wild.
Mitigation Recommendations
A patch is available that applies the existing _to_relative_path containment guard to the 'path' field during submodule update operations, preventing directory traversal. Users should update GitPython to a fixed version that includes this validation. Additionally, validating the 'path' field at the boundary when reading .gitmodules entries to reject absolute paths or those containing '..' components is recommended. Until patched, avoid using submodule update operations on non-HEAD commits with untrusted .gitmodules files.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BREW-kimi-cli-CVE-2026-100689
- Osv Schema Version
- 1.7.3
- Ecosystems
- ["Homebrew"]
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6acaad8d2cdf04f65651436b
Added to database: 10/10/2026, 21:26:37 UTC
Last enriched: 10/10/2026, 21:32:06 UTC
Last updated: 10/10/2026, 21:32:06 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.