Vulnerability in GitPython (CVE-2026-78679)
Summary
Vulnerability in GitPython (CVE-2026-78679). Confidential information can be exposed externally. Exploitable via reference. Mitigation: upgrade to 3.1.59 or later.
Original description
The description as published by the source.
Summary
TagReference.create() forwards a caller-influenced positional reference value into git tag without it ever being inspected by the unsafe-option guard, allowing an arbitrary file read (the file's contents are returned in-band as the annotated tag message). This is an incomplete-fix bypass of commit 3af0c251 (the fix for GHSA-3f7w-8rr8-f37f's tag instance).
Root Cause
The fix 3af0c251 added unsafe_git_tag_options = ["--file","-F"] and a guard call, but the guard is Git.check_unsafe_options(options=Git._option_candidates([], kwargs), unsafe_options=...) at git/refs/tag.py:139 — it passes an EMPTY args list and inspects kwargs only. The dangerous values path and reference are POSITIONALS (args = (path, reference), tag.py:156), placed before any --. A user-influenced reference="--file=" therefore reaches git tag as the exact --file option the fix intended to block, creating an annotated tag whose message is the file's contents.
Impact
Arbitrary local file read at the privileges of the host process; contents returned in-band via tagref.tag.message. Requires the embedding application to forward a caller-influenced reference value into TagReference.create() (pure VALUE control — the CVE-2026-42215 threat model). Default allow_unsafe_options=False.
Proof of Concept
from git import TagReference
t = TagReference.create(repo, "vpwn", reference="--file=/home/app/.ssh/id_rsa")
print(t.tag.message) # contents of th…
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-78679 has been found in GitPython.
Attackers can target a specific entry point like reference over the network to misuse the product.
Confidential information can be exposed externally. CVSS score: 6.5/10.
What to do: upgrade GitPython to 3.1.59 or later.
If unsure, ask your IT team or search "GitPython CVE-2026-78679" on the vendor's site.
CVE-2026-78679 (GitPython) — CWE-73 / CVSS v3 6.5
Attack vector: remote (network-reachable) / no user interaction
Attack surface: reference / path / tagref.tag.message / _option_candidates
Patched: 3.1.59 — 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.
A vulnerability (CWE-73) exists in GitPython. Attackers reach the vulnerable code path via reference.
Check the vendor advisory for the affected versions of GitPython. Attack surface: reference / path / tagref.tag.message / _option_candidates.
Severity: Medium (CVSS 6.5/10). Confidential information can be exposed externally.
Update to 3.1.59.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
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
-
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.59ステージング環境で 3.1.59 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
Fix status by distribution
Fixed packages published by each distribution for this CVE
- Debian DEBIAN-CVE-2026-78679 python-git
References
- web github.com
- web disclosure@vulncheck.com
- web nvd.nist.gov
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com