Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessPublish malicious repo with crafted config value
-
DeliveryVictim automation clones and uses GitPython
-
ExploitUnrelated GitPython config write re-serializes value
-
ExecutionInjected core.hooksPath becomes live directive
-
PersistGit operation invokes attacker hook
-
ImpactArbitrary code execution on host
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Argument sanitization
|
| Exploitation Conditions | Exploitation requires that a git configuration processed by GitPython already contains an attacker-influenced multi-line quoted value (for example via a malicious cloned repository's config or a shared/included config the attacker can write to), AND that the vulnerable application subsequently performs any GitPython config write, triggering the unsafe re-serialization that promotes the dormant value into a real directive such as core.hooksPath; a hook-invoking git operation must then run for code to execute. Limiting factors that reduce realistic risk: the attacker must get crafted config content into a location GitPython later rewrites, the application must actually perform a config write (not merely read), git hook execution must not be disabled or path-restricted, and the affected GitPython version must be earlier than 3.1.59. There is no per-request authentication gate (PR:N in the vendor vector), but the multi-step trigger sequence - not a single crafted network request - is the practical constraint. |
| Impact | The signals are mixed and should be read carefully rather than taken at face value. The published CVSS 4.0 vector (AV:N/AC:L/PR:N/UI:N, VC/VI/VA:H = 9.3) models the outcome as unauthenticated, low-complexity, network-reachable RCE, which is appropriate for the impact but arguably optimistic on complexity and preconditions: exploitation is not a single self-contained request but a two-part sequence - an attacker-influenced dormant config value must already be present, AND some unrelated GitPython config write must subsequently occur to 'activate' it, followed by a hook-invoking git operation. That chained trigger justifies treating attack complexity as higher than AC:L implies. No EPSS score, SSVC decision, or KEV status was provided in the input, so probabilistic exploitation likelihood and automatability cannot be quantified from the data; the absence of a KEV entry and any confirmed public exploit means this is not evidence of active exploitation. Nonetheless, the combination of high technical impact (code execution), a very common dependency, and a realistic path via malicious repositories or shared config makes this a genuine patch priority for any environment where GitPython processes untrusted repository content or CI/CD automation - teams should treat it as urgent rather than as a high-CVSS-but-low-real-risk theoretical issue. Key caveat: verify the deployment actually performs GitPython config writes on attacker-influenced repos before assuming the network-vector rating applies to your context. |
| Exploit ScenarioDerived | An attacker publishes a repository whose .git/config (or an included config) carries a specially crafted multi-line quoted value that is inert as-is. A CI pipeline or developer tool using pre-3.1.59 GitPython clones the repo and, in the course of normal automation, performs an unrelated config write; the round-trip rewrite converts the dormant value into a live core.hooksPath directive, and the next git operation invokes the attacker's hook script, executing code on the runner. No public proof-of-concept is confirmed in the available data, but the CVSS vector's low interaction requirement fits automated processing pipelines well. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 25, 2026
Arbitrary code execution in GitPython before 3.1.59 arises from unsafe re-serialization of multi-line, quoted git-config values: a dormant crafted value is silently rewritten into a live directive such as core.hooksPath whenever GitPython performs any unrelated config write. An attacker who can seed a malicious config value can thereby point hook execution at attacker-controlled code, gaining code execution the next time a hook-invoking git operation runs. Reported by VulnCheck (CWE-88) with a CVSS 4.0 base of 9.3; no public exploit or CISA KEV listing is identified at time of analysis.
RemediationAI
Vendor-released patch: upgrade GitPython to 3.1.59 or later, which corrects the unsafe re-serialization of multi-line quoted config values; this is the primary and recommended fix, per advisory GHSA-284h-m62q-gf8w (https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-284h-m62q-gf8w). Pin the fixed version across all requirements files, lockfiles, and container images, since GitPython is frequently a transitive dependency. If you cannot upgrade immediately, apply compensating controls: avoid running GitPython against untrusted or externally supplied repositories and config files; where feasible run git operations with hooks disabled or a controlled hooks path (e.g. set core.hooksPath to a read-only, empty directory, or export GIT_CONFIG_NOSYSTEM and constrain per-repo config) so an injected core.hooksPath cannot reach attacker scripts - noting the side effect that legitimate hook-based workflows will stop firing; and isolate GitPython-driven automation in sandboxed, least-privilege runners so that any hook execution is contained. Consult the VulnCheck write-up (https://www.vulncheck.com/advisories/gitpython-before-remote-code-execution-via-config-injection) for detection guidance.
Affected VersionsENISA
Affected Packages
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 widely used pure-Python library for programmatic interaction with git repositories, including reading and writing .git/config and related INI-style configuration files. The root cause is CWE-88 (improper neutralization of argument/line delimiters): git config supports multi-line quoted string values, and GitPython's writer fails to safely re-quote/escape newline characters embedded in such values when it re-serializes the file. A value that was inert while quoted becomes, after a round-trip write, a syntactically distinct configuration line - e.g. an injected core.hooksPath entry. Because git executes scripts from the configured hooks path on ordinary operations (commit, checkout, etc.), converting a data value into a live config directive bridges a parsing flaw directly into command execution. The affected component per CPE is cpe:2.3:a:gitpython-developers:gitpython, all versions prior to 3.1.59.
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
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Malicious config can arrive over the network (AV:N) with no auth (PR:N), but requires a dormant value plus a later unrelated config write and a hook-invoking op, so AC:H; full RCE gives C/I/A:H.
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
GitPython before 3.1.59 fails to safely re-serialize multi-line git-config values during write operations, corrupting dormant quoted values into injected directives like core.hooksPath. Attackers can craft config files with embedded newlines that become live git directives after any unrelated GitPython config write, enabling arbitrary code execution via hook invocation.
Blast Radius
ecosystem impact- 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
GitPython before version 3.1.59 contains a critical arbitrary code execution vulnerability affecting any organization using this library for git operations. Attackers can execute malicious code by injecting crafted configuration values that remain dormant until GitPython performs routine git operations, enabling supply chain and application compromise. The lack of available patches creates immediate operational risk for production systems.
No vendor-released patch identified at time of analysis. Interim mitigations include: (1) restrict write access to git configuration files to authorized administrators only; (2) disable git hook functionality if not required for operations; (3) minimize GitPython use with untrusted or externally-sourced repositories; (4) implement monitoring and alerting on git configuration file modifications; (5) run GitPython-dependent services with minimal required privileges; (6) validate git configuration integrity before config-related operations.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Related Vulnerabilities in GitPython Argument Injection and File Read Flaws
View all 5All versions of package gitpython are vulnerable to Remote Code Execution (RCE) due to improper user input validation, w
Command injection in GitPython before 3.1.51 allows low-privileged attackers to bypass the `check_unsafe_options` blockl
Command injection in GitPython 3.1.30-3.1.46 allows remote authenticated attackers to execute arbitrary commands via und
Command injection and arbitrary file overwrite in GitPython before 3.1.51 expose applications that pass attacker-control
Environment variable exfiltration in GitPython before 3.1.52 allows any attacker who controls a URL passed to `Repo.clon
GitPython is a python library used to interact with Git repositories. Rated high severity (CVSS 7.8), this vulnerability
GitPython is a python library used to interact with Git repositories. Rated medium severity (CVSS 6.5), this vulnerabili
Argument injection in GitPython's clone helpers lets an attacker-controlled multi_options string slip past the unsafe-op
Vendor StatusVendor
SUSE
Severity: Important| Product | Status |
|---|---|
| openSUSE Tumbleweed | Fixed |
| 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 |
| SUSE Linux Enterprise Server 15 SP7 | Affected |
| SUSE Linux Enterprise Desktop 15 SP7 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | Affected |
| SUSE Linux Enterprise Server 15 SP4-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP4-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP6-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP6-LTSS | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | Affected |
| SUSE Linux Enterprise Desktop 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 |
| SUSE Linux Enterprise Server 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.0 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
| openSUSE Leap 16.0 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP4 | Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP5 | Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP6 | Affected |
| SUSE Linux Enterprise Server 15 SP4 | Affected |
| SUSE Linux Enterprise Server 15 SP4-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP5 | Affected |
| SUSE Linux Enterprise Server 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP6 | Affected |
| SUSE Linux Enterprise Server 15 SP6-LTSS | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | Affected |
| SUSE Linux Enterprise Desktop 15 SP4 | Affected |
| SUSE Linux Enterprise Desktop 15 SP5 | Affected |
| SUSE Linux Enterprise Desktop 15 SP6 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS | Affected |
| SUSE Manager Proxy 4.3 | Affected |
| SUSE Manager Retail Branch Server 4.3 | Affected |
| SUSE Manager Server 4.3 | Affected |
| openSUSE Leap 15.4 | Affected |
| openSUSE Leap 15.5 | Affected |
| openSUSE Leap 15.6 | Affected |
EUVD-2026-65222
GHSA-284h-m62q-gf8w
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB