---
id: CVE-2026-78677
title: >-
  GitPython before 3.1.59 omits --separate-git-dir from
  unsafe_git_clone_options, allowing attackers to create arbitrary git
  directories outside the intended clone destination
summary: >-
  GitPython before 3.1.59 omits --separate-git-dir from
  unsafe_git_clone_options, allowing attackers to create arbitrary git
  directories outside the intended clone destination. Attackers can pass a
  separate_git_dir parameter to Repo.clone_…
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N'
cwe:
  - CWE-22
  - CWE-73
vendor: gitpython_project
product: gitpython
affected:
  - gitpython < 3.1.59
patched:
  - gitpython 3.1.59
published: '2026-08-25'
updated: '2026-10-12'
sourceUpdated: '2026-10-12T15:10:00.207'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-78677'
references:
  - url: >-
      https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-8mcc-hrx5-hvxc
    label: disclosure@vulncheck.com
  - url: >-
      https://www.vulncheck.com/advisories/gitpython-before-path-traversal-via-separate-git-dir
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-8mcc-hrx5-hvxc
    label: 134c704f-9b21-4f2e-91b3-4a467353bcc0
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-78677.json
  - url: 'https://access.redhat.com/security/cve/CVE-2026-78677'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2523215'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-78677'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-78677'
  - url: 'https://access.redhat.com/errata/RHSA-2026:79376'
  - url: 'https://access.redhat.com/errata/RHSA-2026:79380'
  - url: 'https://access.redhat.com/errata/RHSA-2026:79372'
  - url: 'https://access.redhat.com/errata/RHSA-2026:79373'
  - url: 'https://github.com/gitpython-developers/GitPython/pull/2210'
  - url: >-
      https://github.com/gitpython-developers/GitPython/commit/b68afff45af0f49e79a3e2d2162018986b37ad5d
  - url: 'https://github.com/gitpython-developers/GitPython'
  - url: 'https://github.com/gitpython-developers/GitPython/releases/tag/3.1.59'
  - url: >-
      https://github.com/pypa/advisory-database/tree/main/vulns/gitpython/PYSEC-2026-3787.yaml
  - url: 'https://github.com/advisories/GHSA-8mcc-hrx5-hvxc'
  - url: 'https://access.redhat.com/errata/RHSA-2026:59135'
  - url: 'https://access.redhat.com/errata/RHSA-2026:59136'
  - url: 'https://access.redhat.com/errata/RHSA-2026:84734'
tags:
  - nvd
  - csaf
  - vex
  - red-hat
  - cve.org
  - exploit-available
  - osv
  - pip
  - ghsa
epss: 0.00651
epssPercentile: 0.51003
aliases:
  - GHSA-8mcc-hrx5-hvxc
  - PYSEC-2026-3787
ecosystem: pip
exploitAvailable: true
ssvc:
  exploitation: poc
  automatable: 'yes'
  technicalImpact: partial
  timestamp: '2026-08-25T15:24:35.538595Z'
ingestedAt: '2026-09-03T19:32:11.796Z'
---

## Overview

GitPython before 3.1.59 omits --separate-git-dir from unsafe_git_clone_options, allowing attackers to create arbitrary git directories outside the intended clone destination. Attackers can pass a separate_git_dir parameter to Repo.clone_from() or Repo.clone() to redirect repository metadata to an attacker-controlled filesystem path, enabling arbitrary directory creation and potential hook execution.

## Affected

- `gitpython < 3.1.59`

## Remediation

Upgrade past the affected range:

- `gitpython 3.1.59`

## Package advisory (CVE-2026-78677)

Affected packages:

- `gitpython < 3.1.59`

Patched in:

- `gitpython 3.1.59`

Source: https://osv.dev/vulnerability/GHSA-8mcc-hrx5-hvxc

## Vendor advisories

- **RHSA-2026:79376** · Red Hat · fixed in: Red Hat Satellite 6.18 · released 2026-10-08 · [advisory](https://access.redhat.com/errata/RHSA-2026:79376)
- **RHSA-2026:79380** · Red Hat · fixed in: Red Hat Satellite 6.18 · released 2026-10-08 · [advisory](https://access.redhat.com/errata/RHSA-2026:79380)
- **RHSA-2026:79372** · Red Hat · fixed in: Red Hat Satellite 6.19 · released 2026-10-08 · [advisory](https://access.redhat.com/errata/RHSA-2026:79372)
- **RHSA-2026:79373** · Red Hat · fixed in: Red Hat Satellite 6.19 · released 2026-10-08 · [advisory](https://access.redhat.com/errata/RHSA-2026:79373)
- **Red Hat VEX** · Important · affected: Exploit Intelligence, 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, … · no fix planned: Red Hat AI Inference Server, Red Hat Ansible Automation Platform 2, Red Hat Enterprise Linux AI (RHEL AI) 3, Exploit Intelligence, … · updated 2026-10-19 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-78677.json)
- **RHSA-2026:59135** · Red Hat · fixed in: Red Hat Ansible Automation Platform 2.5 for RHEL 8, Red Hat Ansible Automation Platform 2.5 for RHEL 9 · released 2026-08-24 · [advisory](https://access.redhat.com/errata/RHSA-2026:59135)
- **RHSA-2026:59136** · Red Hat · fixed in: Red Hat Ansible Automation Platform 2.6 for RHEL 9 · released 2026-08-24 · [advisory](https://access.redhat.com/errata/RHSA-2026:59136)
- **RHSA-2026:84734** · Red Hat · fixed in: Red Hat OpenShift AI 3.4 · released 2026-10-19 · [advisory](https://access.redhat.com/errata/RHSA-2026:84734)
