6.5Medium

CVE-2026-76217GitPython before 3.1.58 Arbitrary File Read via pathspec-from-file

gitpython-developers GitPython Published: (2 months ago)

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

VendorProductVersions
gitpython project gitpython < 3.1.58
gitpython-developers GitPython < 3.1.58, fixed 3.1.58

References and patches

CPE matches (NVD) (1)

  • cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:python:*:* < 3.1.58