Skip to main content

GitPython CVE-2026-78677

| EUVDEUVD-2026-65223 HIGH
Path Traversal (CWE-22)
2026-08-25 VulnCheck GHSA-7r39-6q8m-qw68 GHSA-8mcc-hrx5-hvxc PYSEC-2026-3787
8.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Identify application exposing GitPython clone with user-controlled parameters
  2. Delivery
    Craft request supplying malicious `separate_git_dir` path
  3. Exploit
    GitPython forwards unblocked `--separate-git-dir` to git
  4. Install
    Git creates metadata directory at attacker-specified filesystem path
  5. C2
    Plant hook scripts at redirected `.git` directory
  6. Execute
    Trigger subsequent git operation in application
  7. Impact
    Execute arbitrary commands as application process user

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that an application passes attacker-controlled data as the separate_git_dir parameter to Repo.clone_from() or Repo.clone(), without first filtering it through GitPython's unsafe_git_clone_options mechanism. Applications that derive all clone parameters internally from trusted configuration - never accepting this argument from user input - are not exploitable regardless of GitPython version. Full exploitation to code execution requires a two-stage attack: first, creating a git metadata directory at the target path via the traversal; second, planting or triggering hooks at that path. The second stage is limited by the filesystem write permissions of the process running GitPython and the availability of a git-hook-triggering event. Exploitation is further constrained to the operating-system account under which the affected application runs.

Impact

The supplied CVSS 4.0 base score of 8.7 (AV:N/AC:L/AT:N/PR:N/UI:N) represents a worst-case assumption where a network-accessible application passes user-supplied parameters directly to GitPython clone calls - plausible for CI/CD portals, repository management tools, or code-hosting platforms. However, the vector attributes VC:H with no integrity or availability impact, which is inconsistent with the described primitives: arbitrary directory creation and hook execution are integrity impacts, not confidentiality impacts. This metric choice should be verified against the vendor advisory at GHSA-8mcc-hrx5-hvxc. No EPSS score was provided in the input, so probabilistic exploitation likelihood cannot be quantified. The vulnerability is not in CISA KEV and no public exploit has been identified at time of analysis, reducing urgency relative to the raw score. Real-world risk is strongly architecture-dependent: applications that fully control clone parameters without accepting external input are not exploitable; those that expose git clone operations to untrusted callers carry materially higher risk and should prioritize patching.

Exploit ScenarioDerived

An attacker targeting a self-hosted repository management platform that accepts user-specified clone parameters submits a request containing separate_git_dir=/var/spool/cron/crontabs or another writable, high-privilege path, causing git to create its metadata directory there. If the attacker can subsequently place hook scripts at that location - through a second application function or a race condition - any git operation the server triggers will execute those hooks under the web application's process identity. No public exploit code has been identified at time of analysis, but the attack primitive is well-understood and requires only standard git knowledge.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
1 PoC candidate (unverified) Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 25, 2026

Arbitrary directory creation and potential hook-based code execution in GitPython affects all releases before 3.1.59. The library's clone operations omit --separate-git-dir from the unsafe_git_clone_options blocklist, so any application that passes attacker-controlled values to Repo.clone_from() or Repo.clone() allows git to redirect repository metadata to an arbitrary filesystem path. No public exploit has been identified at time of analysis and the vulnerability is not listed in CISA KEV, but the path-traversal primitive combined with git-hook execution capability produces a realistic high-integrity-impact scenario in exposed applications.

RemediationAI

Upgrade GitPython to version 3.1.59 or later, which adds --separate-git-dir to the unsafe_git_clone_options blocklist, closing the bypass. The vendor advisory is at https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-8mcc-hrx5-hvxc. If an immediate library upgrade is not feasible, applications should explicitly reject or strip any separate_git_dir keyword argument before passing options to Repo.clone_from() or Repo.clone() - note this is a fragile compensating control that requires ongoing maintenance as new unsafe options emerge. A more robust interim measure is to switch to an allow-list approach: enumerate only the specific clone options your application legitimately requires and discard all others, which prevents bypass via other currently-unblocked options. Application-level filtering does not protect downstream callers of the library; patching the library is the only complete fix.

Affected VersionsENISA

GitPython 0 <3.1.59

Affected Packages

pypi gitpython fix: 3.1.59

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

GitPython is a Python library for programmatic git repository access. It maintains an unsafe_git_clone_options list as a defense-in-depth control to block dangerous git options during clone operations, preventing path traversal and injection. The --separate-git-dir git option, which instructs git to store the .git metadata directory at a filesystem path separate from the working tree, was omitted from that list - the CWE-22 (Path Traversal) root cause. Because git writes the metadata directory to wherever --separate-git-dir points, an attacker who controls the separate_git_dir parameter can direct that write to any path writable by the process, escaping the intended clone destination. The affected CPE is cpe:2.3:a:gitpython-developers:gitpython:*:*:*:*:*:*:*:*, covering every version before 3.1.59. If git hooks are subsequently created or already exist at the redirected path, git operations may trigger arbitrary command execution within the process's security context.

Know when Gitpython gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 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
vuln.today AI 9.3 CRITICAL

Network vector reflects worst-case exposed application; S:C and I:H capture hook execution crossing process boundary; C:L acknowledges limited read side-effect from hooks.

3.1 AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:L/SI:N/SA:N
SUSE 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Red Hat 7.5 HIGH

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Aug 25, 2026 - 03:16 EUVD
CVE Published
Aug 25, 2026 - 01:30 cve.org
HIGH 8.7

DescriptionCVE.org

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.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 14 pypi packages depend on gitpython (13 direct, 1 indirect)

Ecosystem-wide dependent count for version 3.1.59.

Latest POC

1 PoC candidate from github (unverified)

Sign in to open the public PoC links collected for this CVE.

Executive ViewAI

Why It Matters

A critical code-execution vulnerability in GitPython (versions before 3.1.59) affects any application that automates repository operations with untrusted inputs; no public exploit identified at time of analysis. This creates significant risk for development teams and CI/CD infrastructure that pull code from user-supplied or external sources. Immediate action is required since no vendor patch is currently available.

Business Impact: High
Compensating Controls

Until a vendor patch is released, implement the following interim mitigations: (1) Disable repository cloning from untrusted sources entirely if operationally feasible; (2) Run git operations in isolated containers or sandboxed environments to limit hook execution impact; (3) Implement strict file system permissions to prevent git from writing metadata outside designated repository directories; (4) Monitor git hook execution logs and filesystem changes in git directories for anomalous activity; (5) Restrict network access from systems running GitPython to limit potential lateral movement if a hook-based compromise occurs.

Threat Intelligence Overview

EPSS Score
0.4%
Top 66% exploitable
Prevalence
Medium
popular Python git-automation library, not universally deployed
Threat Intel
1
1 sources
Data Quality
7 sources
Confidence: High
EUVD 🇯🇵JVN NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

64
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS Affected
SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS Affected
SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS Affected
SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS Affected
SUSE Linux Enterprise Module for Python 3 15 SP7 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy