Skip to main content

GitPython EUVDEUVD-2026-51814

| CVE-2026-67326 HIGH
Improper Input Validation (CWE-20)
2026-08-01 VulnCheck GHSA-gmvg-8p66-77hg
7.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Control application input reaching config_writer()
  2. Delivery
    Inject newline into section parameter
  3. Exploit
    Forge [core] section in .git/config
  4. Execution
    Set hooksPath to attacker-controlled directory
  5. Persist
    Trigger git hook via commit or push
  6. Impact
    Execute arbitrary code as git process user

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation, allowlisting
Exploitation Conditions

Exploitation requires an attacker to control or meaningfully influence the section argument passed to config_writer().set_value() within a GitPython-based application - this is the critical and non-trivial prerequisite. The CVSS 4.0 metrics AT:P (attack prerequisites present) and UI:P (passive user interaction required) reflect two additional constraints: (1) a git hook must subsequently be triggered by a user or automated process performing a git operation such as commit, push, or merge in the affected repository, and (2) the attacker must be able to write an executable script to the attacker-controlled hooksPath directory. AV:L indicates this is a local-context attack - the attacker cannot exploit this remotely against arbitrary GitPython instances; they must influence local application behavior. Exploitation is not possible if: the application never passes externally-controlled data to the section parameter; git hooks are globally disabled (core.hooksPath=/dev/null); or GitPython 3.1.50 or later is installed.

Impact

The CVSS 4.0 vector (AV:L/AC:H/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H) reflects a local attack with high complexity and attack prerequisites - exploitation is conditional on controlling input to the section parameter AND subsequently triggering a git hook operation. Despite the high C/I/A impact scores, the AV:L and AC:H metrics significantly limit opportunistic exploitation; this is not a remotely exploitable, unauthenticated, default-configuration flaw. No EPSS score was provided in the input data. There is no CISA KEV listing, meaning active widespread exploitation is not confirmed. However, a working PoC is publicly documented in the GHSA advisory, meaningfully lowering the bar for targeted exploitation. The incomplete-patch nature elevates risk for maintainers who believe they mitigated this attack class with the 3.1.49 update - environments that patched CVE-2026-42215 but have not yet applied 3.1.50 remain fully exposed. Risk is highest in CI/CD pipelines and developer tooling where GitPython processes externally-influenced repository metadata.

Exploit ScenarioDerived

An attacker with the ability to influence a Python application's input that reaches config_writer().set_value() crafts a section string such as 'user]\n[core' paired with a hooksPath value pointing to an attacker-controlled directory containing a malicious pre-commit script. When a developer or automated pipeline subsequently runs a git commit or any hook-triggering operation in the affected repository, git reads the forged [core] hooksPath from .git/config and executes the attacker's script with the privileges of the git process. A fully working PoC demonstrating this chain - including RCE confirmation via /tmp/rce_proof.txt - is publicly documented in GHSA-mv93-w799-cj2w.

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

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

Alert me

AnalysisAIv1 – Aug 01, 2026

Remote code execution via newline injection in GitPython before 3.1.50 allows an attacker who controls the section argument of config_writer().set_value() to forge arbitrary section headers - including a malicious [core] block - in .git/config, redirecting git hook execution to an attacker-controlled directory. This is a confirmed incomplete-patch bypass of CVE-2026-42215: the 3.1.49 fix sanitized only the value parameter while leaving section and option unvalidated. A working proof-of-concept is publicly available in the vendor's GHSA advisory, and the fix is confirmed in GitPython 3.1.50.

RemediationAI

Upgrade GitPython to version 3.1.50 or later via pip (pip install --upgrade gitpython), which introduces newline validation for the section parameter in config_writer() and closes this bypass. The vendor advisory is at https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-mv93-w799-cj2w. If immediate upgrade is not feasible, audit all callers of config_writer().set_value() in your codebase and reject or sanitize any externally-influenced section arguments at the application layer - note this requires code-level review of every call site and is error-prone. As a secondary compensating control, set core.hooksPath to /dev/null in affected repositories (git config core.hooksPath /dev/null) to prevent hook execution, though this will break any hook-dependent CI or automation workflows. Do not rely on the 3.1.49 patch as sufficient mitigation - it is confirmed incomplete for section and option parameters.

Affected VersionsENISA

GitPython 0 <3.1.50

Affected Packages

pypi gitpython fix: 3.1.50

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 (CPE: cpe:2.3:a:gitpython-developers:gitpython:*:*:*:*:*:*:*:*) is a widely used Python library for programmatic git repository interaction. The vulnerability originates in git/config.py: set_value() calls add_section() with the caller-supplied section string without any newline validation, then passes it to Python's configparser. The _write() method formats section headers as '[%s]\n' - so a section argument of 'user]\n[core' produces two syntactically valid section headers in .git/config. This allows injection of a forged [core] section specifying hooksPath to an attacker-controlled directory. CWE-20 (Improper Input Validation) is the root cause - specifically an incomplete fix that left two of three parameters (section and option) unsanitized after the prior CVE-2026-42215 patch addressed only the value parameter.

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

Local vector since attacker must influence library-level input; AC:H and UI:R because a hook-triggering git operation must follow; PR:N as no system authentication is required.

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

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Local
Attack Complexity
High
Attack Requirements
Present
Privileges Required
None
User Interaction
Passive
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 01, 2026 - 13:01 EUVD
CVE Published
Aug 01, 2026 - 12:22 cve.org
HIGH 7.3

DescriptionCVE.org

GitPython before 3.1.50 fails to validate newline characters in the section parameter of config_writer(), allowing attackers to inject arbitrary section headers into .git/config. Attackers can inject newlines to create a forged [core] section with hooksPath pointing to attacker-controlled directories, achieving remote code execution when git hooks are triggered.

Blast Radius

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

Ecosystem-wide dependent count for version 3.1.50.

Executive ViewAI

Why It Matters

GitPython, a foundational library used in many development automation and CI/CD systems, contains a remote code execution vulnerability (CVE-2026-67326) that allows attackers to inject malicious Git configuration and execute arbitrary code. Organizations whose build pipelines, automation systems, or development tools depend on affected versions face immediate risk of code injection and supply-chain compromise. This is a confirmed bypass of an incomplete patch from version 3.1.49, requiring urgent remediation.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 91% exploitable
Prevalence
Medium
widely used Python library for git automation in developer tooling and CI/CD
Data Quality
8 sources
Confidence: High
EUVD 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.2%
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
Small
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

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

Attack Technique

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

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-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

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

Vendor StatusVendor

SUSE

Severity: Important
Product Status
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
SUSE Linux Enterprise Server 16.0 Affected

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