6.5Medium
CVE-2026-76217GitPython before 3.1.58 Arbitrary File Read via pathspec-from-file
Description
GitPython versions before 3.1.58 fail to validate options passed to git rm and git checkout commands in IndexFile.remove() and Head.checkout(). Attackers can supply --pathspec-from-file and --pathspec-file-nul parameters to read arbitrary files accessible to the process, with full file contents returned in GitCommandError.stderr.
Weakness (CWE):
CWE-73
Data: CVE.org, NVD, CISA KEV, FIRST EPSS, Ubuntu. Published as the sources state it, in English.
Affected products and versions
| Vendor | Product | Versions | |
|---|---|---|---|
| gitpython project | gitpython | < 3.1.58 | |
| gitpython-developers | GitPython | < 3.1.58, fixed 3.1.58 |
References and patches
- GitHub Security Advisory (GHSA-hh9p-6wh2-4mfc) vendor-advisoryExploitVendor Advisory
- VulnCheck Advisory: GitPython before 3.1.58 Arbitrary File Read via pathspec-from-file third-party-advisoryThird Party Advisory
CPE matches (NVD) (1)
cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:python:*:*< 3.1.58