CVE-2026-76217
Received Received - Intake

GitPython Arbitrary File Read via Git Command Injection

Vulnerability report for CVE-2026-76217, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-19

Last updated on: 2026-08-19

Assigner: VulnCheck

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-19
Last Modified
2026-08-19
Generated
2026-08-19
AI Q&A
2026-08-19
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
gitpython gitpython to 3.1.58 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-73 The product allows user input to control or influence paths or file names that are used in filesystem operations.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

CVE-2026-76217 is a vulnerability in GitPython versions before 3.1.58 where the IndexFile.remove() and Head.checkout() functions fail to validate options passed to git rm and git checkout commands. Attackers can exploit this by supplying --pathspec-from-file and --pathspec-file-nul parameters to read arbitrary files accessible to the process. The file contents are returned in GitCommandError.stderr.

Detection Guidance

To detect this vulnerability, check the installed version of GitPython using the command: pip show gitpython. If the version is below 3.1.58, the system is vulnerable. Additionally, review code that uses IndexFile.remove() or Head.checkout() methods for unvalidated user input passed to these functions.

Impact Analysis

This vulnerability allows attackers with local access to read sensitive files on the system where GitPython is used. The impact is limited to information disclosure, meaning attackers can view file contents but cannot modify or execute files. No additional privileges are required beyond local access.

Compliance Impact

This vulnerability could lead to unauthorized access to sensitive data, potentially violating compliance requirements under GDPR, HIPAA, or other regulations that mandate protection of personal or health information. Organizations using vulnerable GitPython versions may face legal and regulatory penalties due to data exposure.

Mitigation Strategies

Immediately upgrade GitPython to version 3.1.58 or later using the command: pip install --upgrade gitpython. If upgrading is not possible, restrict access to code that uses IndexFile.remove() or Head.checkout() methods to trusted users only.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-76217. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart