Skip to main content

GitPython EUVDEUVD-2026-57792

| CVE-2026-73623 HIGH
OS Command Injection (CWE-78)
2026-08-13 VulnCheck GHSA-2726-phmx-rc26
7.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Stage executable post-checkout hook in attacker-reachable directory
  2. Delivery
    Supply --template path via Repo.clone_from() template argument
  3. Exploit
    --template passes check_unsafe_options (absent from denylist)
  4. Execution
    Git copies hook directory into cloned repo's .git/hooks/
  5. Persist
    Git executes post-checkout hook at checkout time
  6. Impact
    Arbitrary OS commands run under cloning process identity

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK

2 techniques across 1 tactic: Execution

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

Exploitation Conditions

Two concurrent conditions are required. First, the attacker must have sufficient access to influence the template keyword argument or an equivalent --template entry in multi_options passed to Repo.clone_from() - this implies at least low-privilege access to the application interface that triggers clone operations (PR:L). Second, the attacker must be able to stage a directory containing a chmod +x executable post-checkout hook that the git process can read at clone time; the advisory notes this is realistic via shared filesystems, world-writable paths like /tmp, application upload directories, or attacker-writable network-mounted paths (AT:P). Exploitation operates in the default allow_unsafe_options=False configuration - the denylist bypass is the sole required condition within GitPython itself. Exploitation is limited by: the need for filesystem-reachable hook staging (network-only attackers without local or shared filesystem access cannot satisfy AT:P); the requirement for argument influence (not exploitable by targets who call clone_from() with fully internal, non-user-derived options); and the PR:L requirement (unauthenticated external callers who cannot reach clone argument paths are not affected).

Impact

The CVSS 4.0 score of 7.7 with AC:H and AT:P accurately reflects the dual precondition: the attacker must both control clone arguments (PR:L) and stage a reachable hook directory. These modifiers appropriately temper what would otherwise be a near-critical impact triple (VC:H/VI:H/VA:H). EPSS data is absent from the provided intelligence - exploitation probability cannot be quantified. No CISA KEV listing is present, so mass exploitation is not confirmed. However, a live-verified POC against the latest release at disclosure (3.1.53) significantly elevates real-world risk: the barrier to weaponization is low for any application that forwards user-supplied metadata to clone_from(). Highest-risk deployments are CI/CD pipelines, git hosting platforms, code analysis services, and developer automation tools that accept external repository inputs. The absence of KEV listing and the AC:H/AT:P conditions suggest targeted rather than opportunistic exploitation at this stage, but the confirmed POC and the ubiquity of GitPython in Python-based DevOps tooling make patching urgent.

Exploit ScenarioDerived

An attacker targeting a CI/CD service backed by GitPython stages an executable post-checkout hook (e.g., a reverse shell or credential harvester) in a world-readable directory such as /tmp/evil/hooks/post-checkout. The attacker then submits a repository job or API request that causes the service to call Repo.clone_from(url, dest, template='/tmp/evil') - achievable wherever the application forwards user-controlled repository metadata to clone arguments. Git copies the hook directory into the new repository and executes post-checkout during checkout, running arbitrary OS commands under the service's process identity. A proof-of-concept demonstrating this exact chain has been publicly disclosed and live-verified against GitPython 3.1.53.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.7% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Aug 13, 2026

Arbitrary OS command execution in GitPython <= 3.1.53 is achievable during clone operations because the unsafe_git_clone_options denylist in base.py omits --template, allowing it to pass check_unsafe_options without error in the default allow_unsafe_options=False configuration. Callers who can influence Repo.clone_from() arguments can supply a --template path to an attacker-staged directory containing an executable post-checkout hook, which git automatically executes at checkout time. A live-verified proof-of-concept against tag 3.1.53 has been publicly disclosed; no active exploitation is confirmed in CISA KEV at time of analysis.

RemediationAI

Upgrade GitPython to version 3.1.54 or later via pip install --upgrade gitpython. Version 3.1.54 adds --template to the unsafe_git_clone_options denylist in base.py, closing the bypass. The upstream fix is in PR #2180 (https://github.com/gitpython-developers/GitPython/pull/2180) and commit ffcb5359e87619f4fe4a70a4aff5f08c5580ba97. If immediate upgrade is not possible, audit all Repo.clone_from() call sites in the application and reject or sanitize any user-supplied values that reach the template keyword argument or --template in multi_options before they are passed to GitPython - this prevents the attacker from specifying the hook-staging directory. Additionally, ensure that directories reachable by the cloning process (e.g., /tmp, upload directories, shared mounts) do not contain world-executable hook scripts; this limits the attack surface for the hook-staging precondition, though it is not a substitute for patching.

Affected VersionsENISA

GitPython 0 <3.1.54

Affected Packages

pypi gitpython fix: 3.1.54

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 (pip package, CPE: cpe:2.3:a:gitpython-developers:gitpython:*:*:*:*:*:*:*:*) is a Python library wrapping git operations. The flaw resides in base.py lines 145-152, where unsafe_git_clone_options is defined as ['--upload-pack', '-u', '--config', '-c']. The --template git option is absent from this list. When git clone --template=<dir> is invoked, git copies <dir>/hooks/ into the new repository's .git/hooks/ directory and automatically executes any post-checkout hook present at checkout time - a git-native behavior that is independent of protocol.allow or GIT_ALLOW_PROTOCOL controls. The root cause maps to CWE-78 (OS Command Injection via incomplete neutralization): the denylist is the sole guard against option injection, and an omitted entry permits a hook-staging vector that git then executes with the privileges of the cloning process.

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 7.7 HIGH
CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 8.5 HIGH

AV:N as clone targets remote URLs; AC:H for hook-staging precondition (AT:P equivalent); PR:L as caller must control clone arguments; S:C because hook execution escapes the library's own scope.

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

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

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

Lifecycle Timeline

2
Patch available
Aug 13, 2026 - 13:01 EUVD
CVE Published
Aug 13, 2026 - 11:28 cve.org
HIGH 7.7

DescriptionCVE.org

GitPython before 3.1.54 contains an incomplete denylist in unsafe_git_clone_options that omits --template, allowing attackers to achieve arbitrary command execution during clone operations. Attackers can supply --template pointing to a directory containing malicious post-checkout hooks that execute when git clones the repository.

Blast Radius

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

Ecosystem-wide dependent count for version 3.1.54.

Executive ViewAI

Why It Matters

GitPython versions 3.1.53 and earlier contain an arbitrary OS command execution vulnerability in repository clone operations that could allow attackers to execute code within development and CI/CD environments. Organizations relying on GitPython face supply chain risk if their applications or build pipelines process untrusted repository cloning requests.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Validate and sanitize --template arguments in all Repo.clone_from() calls to reject or block this option; (2) Restrict template directory access to a curated whitelist of trusted paths; (3) Execute clone operations within isolated, ephemeral sandboxed environments where feasible; (4) Where possible, replace GitPython clone operations with native git commands using validated argument filtering.

Threat Intelligence Overview

EPSS Score
0.7%
Top 50% exploitable
Prevalence
Medium
popular Python library for git automation in CI/CD and DevOps tooling
Data Quality
7 sources
Confidence: High
EUVD 🇯🇵JVN NVD CVE.org EPSS Vulnrichment Vendor GitHub VulDB

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 No
EPSS 0.7%
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
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

39
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

OS command injection occurs when an application passes unsanitized user input directly into system shell commands.

CVE-2022-24439 CRITICAL POC
9.8 Dec 06

All versions of package gitpython are vulnerable to Remote Code Execution (RCE) due to improper user input validation, w

CVE-2026-78676 CRITICAL POC
9.3 Aug 25

Arbitrary code execution in GitPython before 3.1.59 arises from unsafe re-serialization of multi-line, quoted git-config

CVE-2026-78677 HIGH POC
8.7 Aug 25

Arbitrary directory creation and potential hook-based code execution in GitPython affects all releases before 3.1.59. Th

CVE-2026-78675 HIGH POC
8.6 Aug 25

GitPython before 3.1.59 discloses local file content through exception messages when parsing .gitmodules files that cont

CVE-2023-40590 HIGH POC
7.8 Aug 28

GitPython is a python library used to interact with Git repositories. Rated high severity (CVSS 7.8), this vulnerability

CVE-2026-78679 HIGH POC
7.1 Aug 25

Arbitrary file read in GitPython before 3.1.59 allows low-privileged remote attackers to exfiltrate sensitive files by s

CVE-2026-78678 HIGH POC
7.1 Aug 25

Arbitrary file read in GitPython versions before 3.1.59 exposes sensitive filesystem content to low-privileged network a

CVE-2023-41040 MEDIUM POC
6.5 Aug 30

GitPython is a python library used to interact with Git repositories. Rated medium severity (CVSS 6.5), this vulnerabili

CVE-2023-40267 CRITICAL
9.8 Aug 11

GitPython before 3.1.32 does not block insecure non-multi options in clone and clone_from. Rated critical severity (CVSS

CVE-2026-67324 CRITICAL
9.3 Aug 01

Command execution in GitPython 3.1.50 arises because its default unsafe-option gate fails to recognize joined short-opti

CVE-2026-67325 HIGH POC
8.7 Aug 01

Command injection in GitPython before 3.1.51 allows low-privileged attackers to bypass the `check_unsafe_options` blockl

CVE-2026-42215 HIGH POC
8.8 May 07

Command injection in GitPython 3.1.30-3.1.46 allows remote authenticated attackers to execute arbitrary commands via und

Vendor StatusVendor

SUSE

Severity: Important
Product Status
openSUSE Tumbleweed Fixed
SUSE Linux Enterprise Desktop 15 SP7 Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Affected
SUSE Linux Enterprise Module for Python 3 15 SP7 Affected
SUSE Linux Enterprise Server 15 SP7 Affected

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