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.
Published: 2026-08-25
Score: 7.1 High
EPSS: < 1% Very Low
KEV: No
Impact: Arbitrary File Read
Action: Apply Patch
AI Analysis

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.

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

Remediation

No vendor fix or workaround currently provided.

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
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

Thu, 10 Sep 2026 00:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Moderate


Wed, 02 Sep 2026 18:30:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:python:*:*

Tue, 25 Aug 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Tue, 25 Aug 2026 04:45:00 +0000

Type Values Removed Values Added
First Time appeared Gitpython-developers
Gitpython-developers gitpython
Vendors & Products Gitpython-developers
Gitpython-developers gitpython

Tue, 25 Aug 2026 02:00:00 +0000

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'}


Subscriptions

Gitpython-developers Gitpython
Gitpython Project Gitpython
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-25T15:18:02.854Z

Reserved: 2026-08-25T01:17:12.262Z

Link: CVE-2026-78678

cve-icon Vulnrichment

Updated: 2026-08-25T15:17:37.004Z

cve-icon NVD

Status : Analyzed

Published: 2026-08-25T02:16:52.313

Modified: 2026-09-02T18:17:58.337

Link: CVE-2026-78678

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-08-25T01:30:35Z

Links: CVE-2026-78678 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-25T04:30:05Z

Weaknesses
  • CWE-88

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