Categories
CVE-2026-76219 high CVSS 8.1

Vulnerability in gitpython (CVE-2026-76219)

Summary

Vulnerability in gitpython (CVE-2026-76219). Data can be tampered with by attackers. Exploitable via IndexFile.from_tree. Mitigation: upgrade to 3.1.58 or later.

Original description

The description as published by the source.

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

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2026-76219 has been found in gitpython.
Attackers can target a specific entry point like IndexFile.from_tree over the network to misuse the product.
Data can be tampered with by attackers. CVSS score: 8.1/10.
What to do: upgrade gitpython to 3.1.58 or later.
If unsure, ask your IT team or search "gitpython CVE-2026-76219" on the vendor's site.

CVE-2026-76219 (gitpython) — CWE-88 / CVSS v3 8.1
Attack vector: remote (network-reachable) / no user interaction
Attack surface: IndexFile.from_tree / IndexFile.reset / IndexFile.merge_tree / allow_unsafe_options
Patched: 3.1.58 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

❓ What is the problem

A vulnerability (CWE-88) exists in gitpython. Attackers reach the vulnerable code path via IndexFile.from_tree.

📍 Affected scope

Check the vendor advisory for the affected versions of gitpython. Attack surface: IndexFile.from_tree / IndexFile.reset / IndexFile.merge_tree / allow_unsafe_options.

🔥 Severity

Severity: High (CVSS 8.1/10). Data can be tampered with by attackers.

🔧 How to fix

Update to 3.1.58.

🛡️ Workaround

Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.

🔍 Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'gitpython' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  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 でアラート再発が無いか継続監視。

Affected packages

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

Fix status by distribution

Fixed packages published by each distribution for this CVE

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details