Vulnérabilité dans gitpython (CVE-2026-76217)
Résumé
Vulnérabilité dans gitpython (CVE-2026-76217). Des informations confidentielles peuvent être exposées. Exploitable via GitCommandError.stderr. Atténuation : mise à jour vers 3.1.58 ou plus.
Description d'origine
La description telle que publiée par la source (souvent en anglais).
Summary
IndexFile.remove() and Head.checkout() forward **kwargs into git rm and git checkout
with no guard. Passing --pathspec-from-file= together with --pathspec-file-nul
makes Git treat the whole file as a single NUL-delimited pathspec, and the unmatched-pathspec
error quotes it verbatim. GitPython surfaces that through GitCommandError.stderr, so the
entire contents of a caller-chosen file are returned to the caller in band.
This is the same primitive as Instance 2 of
GHSA-3f7w-8rr8-f37f - TagReference.create()
with -F, arbitrary file read returned in band - at two sites that advisory assessed and
cleared.
Prior art, and why I am filing rather than commenting
GHSA-3f7w-8rr8-f37f's sweep table lists these four sites with the assessment
"--pathspec-from-file only reads a pathspec; no write or disclosure primitive found":
| Call site | git command | that advisory's assessment |
|---|---|---|
IndexFile.remove() |
rm |
--pathspec-from-file only reads a pathspec; no write or disclosure primitive found |
IndexFile.move() |
mv |
same |
HEAD.reset() |
reset |
same |
HEAD.checkout() |
checkout |
same |
That assessment is very nearly right, and I think that is why it held: with
--pathspec-from-file alone, Git splits on newlines and the error quotes only the first
line, which reads as an uninteresting partial. Adding --pathspec-file-nul - a sibling flag
of the…
Source: NIST National Vulnerability Database NVD GitHub Advisory
Résumé généré automatiquement
Assemblé par SecPulse à partir des données sources (CVSS, CWE, versions affectées) à l'aide de modèles, sans IA. Vérifiez la description d'origine et les références ci-dessous.
Une vulnérabilité référencée CVE-2026-76217 a été découverte dans gitpython.
Des attaquants peuvent cibler un point d'entrée spécifique comme GitCommandError.stderr à distance pour détourner le produit.
Des informations confidentielles peuvent être exposées. Score CVSS : 6.5/10.
Action : mettez à jour gitpython vers 3.1.58 ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « gitpython CVE-2026-76217 » sur le site de l'éditeur.
CVE-2026-76217 (gitpython) — CWE-73 / CVSS v3 6.5
Vecteur d'attaque : distant (réseau) / sans interaction utilisateur
Surface d'attaque : GitCommandError.stderr / reset / checkout / allow_unsafe_options
Correctif : 3.1.58 — appliquer immédiatement
Plan : 1) Audit SBOM, 2) Mise à jour staging→prod, 3) Surveillance WAF/proxy sur les endpoints affectés, 4) Recherche d'IOC dans les logs.
Réfs : voir GHSA / avis éditeur / version corrigée liés sur cette page.
Une vulnérabilité (CWE-73) affecte gitpython. Les attaquants atteignent le code vulnérable via GitCommandError.stderr.
Consultez l'avis de l'éditeur pour les versions affectées de gitpython. Surface d'attaque : GitCommandError.stderr / reset / checkout / allow_unsafe_options.
Gravité : Moyenne (CVSS 6.5/10). Des informations confidentielles peuvent être exposées.
Mettre à jour vers 3.1.58.
En attendant le correctif : désactivez la fonctionnalité concernée, appliquez des règles WAF, ou restreignez l'accès par ACL réseau.
Recherchez dans les logs des requêtes correspondant aux IOC connus de cette CVE. Auditez les SBOM/dépendances.
Actions de réponse
Étapes concrètes et exemples de commandes que les équipes SOC/SRE doivent exécuter dans l'ordre
-
1Identify exposure identify
grep -r 'gitpython' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
gitpythonを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade gitpython to 3.1.58ステージング環境で 3.1.58 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Paquets affectés
État des correctifs par distribution
Paquets corrigés publiés par chaque distribution pour cette CVE
- Debian DEBIAN-CVE-2026-76217 python-git
- Ubuntu UBUNTU-CVE-2026-76217 python-git
Références
- web github.com
- web vulncheck.com
- web nvd.nist.gov
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com