GHSA-w8jc-g24h-crhw: GitPython command wrappers omit unsafe protocol and option checks
GitPython has spent 2022-2026 rolling out two reusable guards method-by-method: Git.check_unsafe_protocols(url) (raises UnsafeProtocolError for <transport>:: remote-helper URLs - CVE-2022-24439) and Git.check_unsafe_options(...) (raises UnsafeOptionError for denylisted option spellings - CVE-2023-40267, CVE-2026-42215, CVE-2026-67323). Three wrapper methods that build a git argv from caller-controlled values still have neither:
Git.ls_remote(git/cmd.py:1128-1143) - checks options (:1139-1141) but forwards the URL positional unchecked; noallow_unsafe_protocolsparameter exists. The same URL throughclone_fromraisesUnsafeProtocolError.Repo.merge_base(git/repo/base.py:895-936) - forwards**kwargs/*revtoself.git.merge_basewith no guard; guarded siblingiter_commitssits 12 lines up. Its exception handler additionally swallows every non-128GitCommandErrorinto[], masking the injection.IndexFile.move(git/index/base.py:1092-1168) - forwards**kwargstogit mvtwice (:1147, :1167); guarded siblingremove()is 23 lines above.
Verified unfixed on main @ a54d159 (2026-09-21), post-dating latest release 3.1.62 (2026-09-07) - all three sites re-verified today.
References
- github.com/advisories/GHSA-w8jc-g24h-crhw
- github.com/gitpython-developers/GitPython/commit/9ad28cc4c7176d22cd6181d69805058a719dd03b
- github.com/gitpython-developers/GitPython/pull/2251
- github.com/gitpython-developers/GitPython/releases/tag/3.2.0
- github.com/gitpython-developers/GitPython/security/advisories/GHSA-w8jc-g24h-crhw
Code Behaviors & Features
Detect and mitigate GHSA-w8jc-g24h-crhw with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →