cve.bz

CVE-2026-78677 gitpython project gitpython: Path traversal

8.7 highExploit referenceEPSS 0.7%Fix available

High (8.7) in gitpython project gitpython. EPSS 0.7% estimated probability of exploitation activity in the next 30 days. Fixed in gitpython 3.1.59.

On this page
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.

Severity

CVSS 4.0

8.7 high
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

CVSS 3.1

7.5 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS
0.7% (unchanged from 0.7% a week ago; 0.7% 30 days ago) estimated probability of exploitation activity in the next 30 days; 52nd percentile. Scored 2026-11-17. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: yes · Technical impact: partial, assessed 2026-08-25. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-22 Improper Limitation of a Pathname to a Restricted Directory (Path traversal)
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-78677 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-78677?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-78677?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-78677 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
gitpython-developers GitPythonbefore 3.1.59

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-8mcc-hrx5-hvxcPyPIgitpython<3.1.593.1.59
PYSEC-2026-3787PyPIgitpython<3.1.593.1.59

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12python-git3.1.30-1+deb12u3DEBIAN-CVE-2026-78677
Debian13python-git3.1.44-1+deb13u1DEBIAN-CVE-2026-78677
Debian14python-git3.1.61-1DEBIAN-CVE-2026-78677
Red Hatansible_automation_platform:2.5::el8automation-controller-cli, automation-controller-venv-tower0:4.6.32-1.el8apRHSA-2026:59135
Red Hatansible_automation_platform:2.5::el8automation-gateway-server0:2.5.20260824-1.el8apRHSA-2026:59135
Red Hatansible_automation_platform:2.5::el8python3.12-aiohttp0:3.14.3-1.el8apRHSA-2026:59135
Red Hatansible_automation_platform:2.5::el8python3.12-gitpython0:3.1.59-1.el8apRHSA-2026:59135
Red Hatansible_automation_platform:2.5::el8, ansible_automation_platform_developer:2.5::el8python3.12-django0:5.2.17-1.el8apRHSA-2026:59135
Red Hatansible_automation_platform:2.5::el9automation-controller-cli, automation-controller-venv-tower0:4.6.32-1.el9apRHSA-2026:59135
Red Hatansible_automation_platform:2.5::el9automation-gateway-server0:2.5.20260824-1.el9apRHSA-2026:59135
Red Hatansible_automation_platform:2.5::el9python3.12-aiohttp0:3.14.3-1.el9apRHSA-2026:59135
Red Hatansible_automation_platform:2.5::el9python3.12-gitpython0:3.1.59-1.el9apRHSA-2026:59135
Red Hatansible_automation_platform:2.5::el9, ansible_automation_platform_developer:2.5::el9python3.12-django0:5.2.17-1.el9apRHSA-2026:59135
Red Hatansible_automation_platform:2.6::el9automation-controller-cli, automation-controller-venv-tower0:4.7.16-1.el9apRHSA-2026:59136
Red Hatansible_automation_platform:2.6::el9automation-platform-ui0:2.6.13-1.el9apRHSA-2026:59136
7 more for Red Hat in the JSON and on Red Hat's page.
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSS, Linux Enterprise High Performance Computing 15 SP5-ESPOS and 8 morepython-GitPython3.1.34.1693646983.2a2ae77-150400.9.8.1SUSE-SU-2026:4072-1
openSUSELeap 16.0python-GitPython3.1.44-160000.4.1openSUSE-SU-2026:21874-1
Alpinev3.24py3-gitpython3.1.61-r0ALPINE-CVE-2026-78677

From the distributions' data via OSV.dev: the Debian Security Tracker; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Important.

Red Hat's statement

Red Hat Product Security has identified a path traversal vulnerability in GitPython versions before 3.1.59. The vulnerability arises because the `--separate-git-dir` option is not included in the `unsafe_git_clone_options` denylist, allowing attackers who control the `separate_git_dir` parameter during repository cloning to redirect Git repository metadata to arbitrary filesystem locations outside the intended clone destination. This can lead to arbitrary directory and file creation bounded only by process permissions. When combined with subsequent Git operations that trigger hook execution on the redirected repository, this vulnerability can escalate to arbitrary code execution. Exploitation requires that the application passes untrusted, attacker-controlled input to the `separate_git_dir` keyword argument of `Repo.clone_from()` or `Repo.clone()` methods without proper validation, while the `allow_unsafe_options` parameter remains at its default value of False.

Red Hat's mitigation

To mitigate this vulnerability, upgrade to GitPython version 3.1.59 or later, which correctly includes `--separate-git-dir` in the unsafe options denylist. If upgrading is not immediately possible, ensure that the `separate_git_dir` parameter is never populated from untrusted or user-controlled sources. Applications should validate and sanitize any input before passing it to GitPython cloning methods, or avoid exposing the `separate_git_dir` parameter to external callers entirely.

ProductPackageStateAdvisory
Red Hat Ansible Automation Platform 2.5 for RHEL 8python3.12-gitpython-0:3.1.59-1.el8apFixed 2026-08-24RHSA-2026:59135
Red Hat Ansible Automation Platform 2.5 for RHEL 9python3.12-gitpython-0:3.1.59-1.el9apFixed 2026-08-24RHSA-2026:59135
Red Hat Ansible Automation Platform 2.6 for RHEL 9python3.12-gitpython-0:3.1.59-1.el9apFixed 2026-08-24RHSA-2026:59136
Red Hat Satellite 6.17 for RHEL 9python-gitpython-0:3.2.1-1.el9pcFixed 2026-11-05RHSA-2026:95656
Red Hat Satellite 6.18 for RHEL 9python3.12-gitpython-0:3.2.1-1.el9pcFixed 2026-11-05RHSA-2026:95657
Red Hat Satellite 6.19 for RHEL 9python3.12-gitpython-0:3.2.1-1.el9pcFixed 2026-10-29RHSA-2026:92861
Red Hat OpenShift AI 2.25rhoai/odh-feature-server-rhel9:1792148523Fixed 2026-10-21RHSA-2026:87410
Red Hat OpenShift AI 3.4rhoai/odh-feature-server-rhel9:1791863220Fixed 2026-10-19RHSA-2026:84734
Red Hat OpenShift AI 3.4rhoai/odh-mlflow-rhel9:1791865967Fixed 2026-10-19RHSA-2026:84734
Red Hat OpenShift AI 3.4rhoai/odh-th06-cpu-torch210-py312-rhel9:1791874335Fixed 2026-10-19RHSA-2026:84734
Exploit Intelligenceexploit-intelligence/vulnerability-analysis-rhel9Affected
Migration Toolkit for Applications 8mta/mta-solution-server-rhel9Not affected
Red Hat AI Inference Serverrhaiis/vllm-cpu-rhel9Will not fix
Red Hat AI Inference Serverrhaiis/vllm-tpu-rhel9Will not fix
Red Hat Ansible Automation Platform 2ansible-automation-platform-24/controller-rhel8Will not fix
Red Hat Ansible Automation Platform 2ansible-automation-platform-24/hub-rhel8Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-25/controller-rhel8Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-25/hub-rhel8Affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-26/controller-rhel9Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-26/hub-rhel9Affected
55 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-78677.

Attack patterns (CAPEC)

  • CAPEC-64 Using Slashes and URL Encoding Combined to Bypass Validation Logic Likelihood: High · Severity: High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-78 Using Escaped Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-79 Using Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-126 Path Traversal Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON