Catégories
CVE-2026-76219 high CVSS 8.1

Vulnérabilité dans gitpython (CVE-2026-76219)

Résumé

Vulnérabilité dans gitpython (CVE-2026-76219). Les données peuvent être altérées par des attaquants. Exploitable via IndexFile.from_tree. 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.from_tree, IndexFile.reset (→ from_tree) and IndexFile.merge_tree append caller-influenced treeish strings positionally to git read-tree with no unsafe-option guard, no allow_unsafe_options parameter, and no -- separator. git read-tree --index-output= writes the resulting index to an arbitrary path, and last-occurrence-wins lets an injected --index-output override the method's internal temp path — clobbering an arbitrary file with a valid git-index blob. This is a distinct, never-guarded sink: commit 3af0c251 (GHSA-3f7w-8rr8-f37f) guarded only checkout_index and tag; read_tree was left unprotected (it is among the acknowledged unguarded call sites in that advisory's sweep but was never reported or fixed).

Root Cause

from_tree (index/base.py:388), reset (delegates to from_tree), and merge_tree (index/base.py:291) call repo.git.read_tree(*arg_list) with no check_unsafe_options and no --. The treeish is caller-influenced and positional.

Impact

Arbitrary file overwrite / destruction at the privileges of the host process. Content is constrained to a git-index blob (not attacker-chosen, so not RCE), but the target path is fully attacker-controlled — corrupting/truncating configs or destroying files at attacker-chosen writable locations = I:H + A:H (per the skill's "overwrite-any-path = I:H" rule). Pure VALUE control (positional treeish). Default configuration.

Proof of Concept

IndexFile.from_tree(repo, "…

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-76219 a été découverte dans gitpython.
Des attaquants peuvent cibler un point d'entrée spécifique comme IndexFile.from_tree à distance pour détourner le produit.
Les données peuvent être altérées par des attaquants. Score CVSS : 8.1/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-76219 » sur le site de l'éditeur.

CVE-2026-76219 (gitpython) — CWE-88 / CVSS v3 8.1
Vecteur d'attaque : distant (réseau) / sans interaction utilisateur
Surface d'attaque : IndexFile.from_tree / IndexFile.reset / IndexFile.merge_tree / 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.

❓ Quel est le problème

Une vulnérabilité (CWE-88) affecte gitpython. Les attaquants atteignent le code vulnérable via IndexFile.from_tree.

📍 Périmètre concerné

Consultez l'avis de l'éditeur pour les versions affectées de gitpython. Surface d'attaque : IndexFile.from_tree / IndexFile.reset / IndexFile.merge_tree / allow_unsafe_options.

🔥 Gravité

Gravité : Élevée (CVSS 8.1/10). Les données peuvent être altérées par des attaquants.

🔧 Comment corriger

Mettre à jour vers 3.1.58.

🛡️ Contournement

En attendant le correctif : désactivez la fonctionnalité concernée, appliquez des règles WAF, ou restreignez l'accès par ACL réseau.

🔍 Détection

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

  1. 1
    Identify exposure identify
    grep -r 'gitpython' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で gitpython を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply patch patch
    Upgrade gitpython to 3.1.58

    ステージング環境で 3.1.58 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  3. 3
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Paquets affectés

pip gitpython
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.1.58"}]}]

Références

Nous utilisons des cookies pour l'analyse d'audience et la mesure publicitaire. Ce réglage s'applique à tous les sites de Game co., Ltd. En savoir plus