CVE-2026-78678

GitPython before 3.1.59 Arbitrary File Read via Repo.blame()

Published Aug 25, 2026 CVSS 4.0 · 7.1 High EPSS < 1% KEV · Not listed
Description
GitPython versions before 3.1.59 contain an incomplete denylist in the unsafe_git_revision_options guard that omits --contents and -S options, allowing attackers to read arbitrary files by passing these options to Repo.blame(). Attackers can supply revision values like --contents=/etc/passwd to leak file contents through the blame result returned to the caller.

Analysis

AI-generated

Technical impact

GitPython versions before 3.1.59 contain an incomplete denylist that omits the --contents and -S options from the unsafe_git_revision_options guard. When these options are passed to Repo.blame(), the function treats them as revision strings and returns the contents of the specified file through the blame output. This flaw allows an attacker to read any file accessible to the running process, potentially leaking sensitive data such as /etc/passwd.

Affected Systems

The vulnerability affects all installations of GitPython with a version earlier than 3.1.59. The product is maintained by the gitpython-developers organization.

Risk and Exploitability

The CVSS score is 7.1, indicating a high impact that compromises confidentiality. EPSS data is not available, and the vulnerability is not listed in the CISA KEV catalog. Based on the description, any user who can invoke Repo.blame() in the application can exploit the flaw; the attack requires no network connectivity beyond what the application itself provides. The ability to read arbitrary files makes the flaw exploitable in both local and potentially remote contexts if the application is exposed to untrusted input.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade GitPython to version 3.1.59 or later.
  • Where an upgrade is not feasible, restrict calls to Repo.blame() to trusted code paths and avoid exposing it to user-supplied input.
  • Implement input validation in the application layer to reject any revision string containing '--contents' or '-S' before passing it to Repo.blame(), thereby mitigating the file read risk.

Generated by OpenCVE AI on August 25, 2026 at 03:38 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4872-1 python-git security update
Github GHSA Github GHSA GHSA-5xxx-qhh7-9287 GitPython: Incomplete unsafe_git_revision_options denylist omits --contents/-S, enabling arbitrary file read via Repo.blame()
History
Type Values Removed Values Added
CPEs cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:python:*:*
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Gitpython-developers
Gitpython-developers gitpython
Vendors & Products Gitpython-developers
Gitpython-developers gitpython
Type Values Removed Values Added
Description GitPython versions before 3.1.59 contain an incomplete denylist in the unsafe_git_revision_options guard that omits --contents and -S options, allowing attackers to read arbitrary files by passing these options to Repo.blame(). Attackers can supply revision values like --contents=/etc/passwd to leak file contents through the blame result returned to the caller.
Title GitPython before 3.1.59 Arbitrary File Read via Repo.blame()
First Time appeared Gitpython Project
Gitpython Project gitpython
Weaknesses CWE-88
CPEs cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:*:*:*
Vendors & Products Gitpython Project
Gitpython Project gitpython
References
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N'}

cvssV4_0

{'score': 7.1, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-88

    Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Oct 8, 2026, 3:25 PM
Reserved
Aug 25, 2026, 1:17 AM
Status
Analyzed
Published
Aug 25, 2026, 2:16 AM
Modified
Oct 12, 2026, 3:10 PM
Severity
Moderate
Public date
Aug 25, 2026, 1:30 AM