---
id: CVE-2026-78678
title: 'gitpython: GitPython: Arbitrary file read via Repo.blame() (CVE-2026-78678)'
summary: >-
  A flaw was found in GitPython. An incomplete denylist in the
  `unsafe_git_revision_options` guard omits `--contents` and `-S` options. This
  allows an attacker to read arbitrary files by passing these options to the
  `Repo.blame()` function. …
severity: medium
cvss: 6.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N'
cvssSource: vendor
cwe:
  - CWE-88
  - CWE-200
vendor: Red Hat
product: Red Hat OpenShift AI (RHOAI)
affected:
  - exploit_intelligence
  - migration_toolkit_for_applications 8
  - ai_inference_server
  - ansible_automation_platform 2
  - enterprise_linux_ai_rhel_ai 3
  - openshift_ai_rhoai
  - openstack_platform 16.2
  - openstack_platform 17.1
  - satellite 6
patched:
  - gitpython 3.1.59
published: '2026-08-25'
updated: '2026-09-09'
sourceUpdated: '2026-09-09T16:11:12+00:00'
source: CSAF
sourceUrl: 'https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-78678.json'
references:
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-78678.json
  - url: 'https://access.redhat.com/security/cve/CVE-2026-78678'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2523196'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-78678'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-78678'
  - url: >-
      https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-5xxx-qhh7-9287
  - url: >-
      https://www.vulncheck.com/advisories/gitpython-before-arbitrary-file-read-via-repo-blame
  - url: 'https://github.com/gitpython-developers/GitPython'
  - url: >-
      https://github.com/pypa/advisory-database/tree/main/vulns/gitpython/PYSEC-2026-3788.yaml
  - url: 'https://github.com/advisories/GHSA-5xxx-qhh7-9287'
tags:
  - csaf
  - vex
  - red-hat
  - osv
  - pip
  - ghsa
epss: 0.0024
epssPercentile: 0.1539
aliases:
  - GHSA-5xxx-qhh7-9287
  - PYSEC-2026-3788
ecosystem: pip
ingestedAt: '2026-09-03T19:32:11.839Z'
---

## Overview

A flaw was found in GitPython. An incomplete denylist in the `unsafe_git_revision_options` guard omits `--contents` and `-S` options. This allows an attacker to read arbitrary files by passing these options to the `Repo.blame()` function. This can lead to information disclosure, as attackers can supply revision values like `--contents=/etc/passwd` to leak file contents.

## Vendor advisories

- **Red Hat VEX** · Moderate · affected: Exploit Intelligence, Migration Toolkit for Applications 8, Red Hat AI Inference Server, Red Hat Ansible Automation Platform 2, Red Hat Enterprise Linux AI (RHEL AI) 3, Red Hat OpenShift AI (RHOAI), … · no fix planned: Exploit Intelligence, Migration Toolkit for Applications 8, Red Hat AI Inference Server, Red Hat Ansible Automation Platform 2, … · updated 2026-09-09 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-78678.json)

**gitpython: GitPython: Arbitrary file read via Repo.blame()** — rated Moderate by Red Hat. Released 2026-08-25, updated 2026-09-09.

Affected:

- Exploit Intelligence
- Migration Toolkit for Applications 8
- Red Hat AI Inference Server
- Red Hat Ansible Automation Platform 2
- Red Hat Enterprise Linux AI (RHEL AI) 3
- Red Hat OpenShift AI (RHOAI)
- Red Hat OpenStack Platform 16.2
- Red Hat OpenStack Platform 17.1
- Red Hat Satellite 6

No fix planned:

- Exploit Intelligence
- Migration Toolkit for Applications 8
- Red Hat AI Inference Server
- Red Hat Ansible Automation Platform 2
- Red Hat Enterprise Linux AI (RHEL AI) 3
- Red Hat OpenShift AI (RHOAI)
- Red Hat OpenStack Platform 16.2
- Red Hat OpenStack Platform 17.1
- Red Hat Satellite 6

Not affected:

- Red Hat Ansible Automation Platform 2
- Red Hat Hardened Images

## Remediation

Fix deferred

Workarounds / mitigations:

- Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

## Package advisory (CVE-2026-78678)

Affected packages:

- `gitpython < 3.1.59`

Patched in:

- `gitpython 3.1.59`

Source: https://osv.dev/vulnerability/GHSA-5xxx-qhh7-9287
