GitPython command wrappers omit unsafe protocol and option checks
Affects GitPythonSource GCVE Database
Mentioned vulnerabilities
CVSS 7.5 High : upgrade to 3.2.0 soon.
Data as of 27 Oct 2026, 17:28 UTC
- Patch
- Available – fixed in 3.2.0
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:HWhat to do
Upgrade GitPython to 3.2.0.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| PyPIGitPython | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A patch is available in GitPython version 3.2.0 that adds the missing unsafe protocol and option checks to the affected methods. Users should upgrade to GitPython 3.2.0 or later to remediate these vulnerabilities. No additional mitigations are required if the patch is applied. For environments where upgrading is not immediately possible, ensure git transport policies disallow unsafe protocols such as 'ext' to reduce risk.
Description
GitPython versions prior to 3.2.0 have security weaknesses in three command wrapper methods—ls_remote, merge_base, and IndexFile.move—that omit checks for unsafe protocols and options. This omission allows potential command injection or remote code execution (RCE) when interacting with maliciously crafted git URLs or arguments, particularly if the underlying git transport policy permits unsafe protocols like 'ext'. The vulnerability is confirmed on the main branch as of 2026-09-21 and affects versions before 3.2.0. A fix is available in version 3.2.0.
References
- github.com/gitpython-developers/GitPython/security/advisories/GHSA-w8jc-g24h-crhw (opens in a new tab)
- github.com/gitpython-developers/GitPython/pull/2251 (opens in a new tab)
- github.com/gitpython-developers/GitPython/commit/9ad28cc4c7176d22cd6181d69805058a719dd03b (opens in a new tab)
- github.com/gitpython-developers/GitPython (opens in a new tab)
- github.com/gitpython-developers/GitPython/releases/tag/3.2.0 (opens in a new tab)