Skip to main content

GitPython CVE-2026-114145

| EUVDEUVD-2026-107557 HIGH
Incorrect Behavior Order (CWE-696)
2026-10-21 GitHub_M GHSA-83vg-56qc-22m7
7.5
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Craft repo with submodule path .git/hooks
  2. Delivery
    Victim app passes untrusted path to create_submodule()
  3. Exploit
    _clone_repo() clones into hooks directory
  4. Execution
    Executable post-checkout hook written to disk
  5. Persist
    Later Git checkout operation runs hook
  6. Impact
    Arbitrary code execution in victim context

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Incorrect behavior order
Exploitation Conditions

Requires an application that passes an attacker-influenced submodule path (e.g. .git/hooks) into GitPython's create_submodule(), AND a clone destination empty enough for Git to clone into it - in practice meaning the default sample hooks are absent from .git/hooks. Exploitation further requires a later Git operation to perform a checkout so the planted post-checkout hook executes (UI:R). Limiting factors: the attack is gated by this non-default application behavior (accepting untrusted submodule paths) and the empty-hooks state, making it unsuitable against applications that validate submodule paths or against repos with standard sample hooks present; it is network-reachable and needs no attacker authentication (PR:N) against affected versions 3.1.x through 3.2.0-affected revisions, fixed in 3.2.1.

Impact

The CVSS 3.1 base score of 7.5 (HIGH) is driven by AV:N, PR:N and full C:H/I:H/A:H impact reflecting arbitrary code execution via a planted Git hook, but two metrics materially temper real-world risk: AC:H (the destination such as .git/hooks must be empty enough for Git to clone into it, which requires default sample hooks to be absent) and UI:R (a later Git operation must run to trigger the post-checkout hook). No EPSS score, KEV listing, or POC indicator was provided in the input, so there is no public exploit identified at time of analysis and no evidence of active exploitation - exploitation status is unproven, not disproven. SSVC-style reading: exploitation=none observed, technical impact=total (code execution), but automatable=likely NO because the attack depends on an application deliberately feeding untrusted submodule paths into create_submodule() plus a specific empty-hooks precondition. Net assessment: this is a legitimately serious code-execution bug in a popular library, but it is a conditional, usage-dependent issue rather than a broadly wormable internet-facing flaw - prioritize for applications that process untrusted repositories/submodules, de-prioritize elsewhere. The 'Information Disclosure' tag conflicts with the actual impact (code execution via hook), and the absence of EPSS/KEV/POC signals should be read as missing data, not as confirmation of low risk.

Exploit ScenarioDerived

An attacker publishes or submits a malicious repository whose submodule configuration points the submodule path at .git/hooks, then induces a victim application that uses GitPython's create_submodule() to process it. Because _clone_repo() runs before the destination is safely rejected, Git clones attacker content into the hooks directory, planting an executable post-checkout hook that runs the next time a Git operation performs a checkout - yielding code execution in the victim's context. No public exploit was identified at time of analysis, and the high attack complexity (an empty .git/hooks with default sample hooks absent) plus required follow-on Git operation limit reliable exploitation.

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

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

Alert me

AnalysisAIv1 – Oct 21, 2026

Improperly ordered path validation in GitPython before 3.2.1 enables unauthenticated remote attackers who can influence a submodule path to make create_submodule() clone an attacker-controlled repository into a Git metadata location such as .git/hooks, planting a post-checkout hook that executes arbitrary code when a later checkout occurs. The CVSS 3.1 score of 7.5 (HIGH) is materially tempered by AC:H-the hooks directory must be empty enough for Git to clone into, typically requiring default sample hooks to be absent-and UI:R, since a subsequent Git operation must trigger the hook. No public exploit identified at time of analysis; affected code spans 3.1.x through 3.2.0-affected revisions and is fixed in 3.2.1.

RemediationAI

Vendor-released patch: 3.2.1. Upgrade GitPython to 3.2.1 or later from https://github.com/gitpython-developers/GitPython/releases/tag/3.2.1; the fix is tracked in advisory GHSA-83vg-56qc-22m7 (https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-83vg-56qc-22m7), commit 97eadb888d2f99567e3113f4e455be4ca128f697, and PR 2264. If upgrade is delayed, do not pass untrusted or user-supplied submodule paths into create_submodule(); enforce an application-side allowlist and reject paths that contain .git components or resolve inside the repository's .git directory, understanding this only protects callers you control. As a compensating control, run Git with core.hooksPath set to an empty directory or /dev/null to block post-checkout hook execution, but this disables all hooks including legitimate automation; alternatively keep .git/hooks populated with sample hooks so a clone into it fails, though this is brittle and does not address other git_dir aliases. Remove any unexpected files from .git/hooks after a failed or suspicious submodule operation.

Affected VersionsENISA

GitPython < 3.2.1

Affected Packages

pypi gitpython fix: 3.2.1

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 interface to Git; its create_submodule() API constructs submodule configuration and calls _clone_repo() to populate a checkout path under the parent working tree. The root cause is CWE-696 (Incorrect Behavior Order): the destination path is validated only after the clone has written files, so a path that resolves to .git/hooks can receive a repository whose contents include an executable post-checkout hook. In 3.1.x the _validate_repo_path() guard is absent and the clone proceeds silently; in 3.2.0 and later affected revisions a check in git/index/base.py raises ValueError after disk writes and leaves the planted file behind. The 3.2.1 fix (commit 97eadb888d2f99567e3113f4e455be4ca128f697, PR 2264) moves path validation before _clone_repo(), rejects submodule checkout paths that alias the repository's git_dir/common_dir, adds Windows reserved-name/path checks, rejects nested Git directories, and cleans up a partial clone when post-clone validation fails. The assessed AV:N/AC:H/PR:N/UI:R vector reflects that exploitation is network-reachable without authentication but gated by application behavior and the empty-hooks precondition, with a later checkout required for hook execution.

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 (GitHub_M) PRIMARY 7.5 HIGH
AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
vuln.today AI 7.5 HIGH

AC:H because exploitation needs an empty .git/hooks (sample hooks absent) plus an app accepting untrusted submodule paths; PR:N unauthenticated; UI:R for the triggering Git operation; C/I/A:H via code execution through the planted hook.

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

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Patch available
Oct 21, 2026 - 22:03 EUVD
CVE Published
Oct 21, 2026 - 20:35 cve.org
HIGH 7.5

DescriptionCVE.org

GitPython is a python library used to interact with Git repositories. Prior to 3.2.1, create_submodule() in git/objects/submodule/base.py accepts an attacker-influenced submodule path such as .git/hooks and invokes _clone_repo() before safely rejecting the destination. In 3.1.x, _validate_repo_path() does not exist and the call succeeds silently, while in 3.2.0 and later affected revisions the check in git/index/base.py raises ValueError only after the clone has written to disk and does not remove the planted file. An attacker-controlled submodule can therefore place an executable post-checkout hook that a later Git operation executes. Exploitation requires an application to accept an untrusted submodule path and a clone destination such as .git/hooks that is empty enough for Git to clone into it, which commonly means that default sample hooks are absent. This issue is fixed in version 3.2.1.

Blast Radius

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

Ecosystem-wide dependent count for version 3.2.1.

Technical POC Analysis

CWE-696, Incorrect Behavior Order - validation runs after mutation.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

GitPython releases before 3.2.1 contain a high-severity path-ordering weakness that can redirect submodule cloning into Git metadata and plant a hook for later code execution. The exposure is concentrated in engineering workflows and CI/CD systems that call create_submodule() with externally influenced submodule paths, where a successful attack could compromise build integrity and developer environments. No public exploit was identified at time of analysis, but leadership should prioritize inventory and upgrade because the potential impact is arbitrary code execution.

Business Impact: High
Compensating Controls

Apply vendor patch (GitPython 3.2.1).

Threat Intelligence Overview

EPSS Score
0.3%
Top 83% exploitable
Prevalence
Medium
popular Python Git library and common dependency, but not universally deployed
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High

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.3%
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· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

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

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

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-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-67323 HIGH POC
8.6 Aug 01

Command injection and arbitrary file overwrite in GitPython before 3.1.51 expose applications that pass attacker-control

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-67322 HIGH POC
8.7 Aug 01

Environment variable exfiltration in GitPython before 3.1.52 allows any attacker who controls a URL passed to `Repo.clon

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

Vendor StatusVendor

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