GitPython CVE-2026-44244
HIGHAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to application
-
DeliveryInject newline payload in config parameter
-
ExploitApplication writes malformed .git/config
-
ExecutionAttacker uploads malicious hook script
-
PersistVictim triggers Git operation
-
ImpactHook executes attacker code
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the application to call GitPython's config_writer().set_value() with at least one parameter derived from attacker-controlled input (user.name, user.email, or any config section/key/value). The attacker must have authenticated access to the application layer that invokes GitPython (PR:L) - in MLRun's case, valid API credentials to call project.push(). The target repository must be accessible to the attacker for writing .git/config (either direct filesystem access or via application logic that writes config on the attacker's behalf). Exploitation impact amplifies in multi-user deployments where the poisoned .git/config is shared across user contexts - non-shared single-user repositories limit impact to the repository owner's privilege level. Git operations that invoke hooks (commit, merge, checkout, rebase) must occur after poisoning for code execution to trigger, but these are standard operations in any active repository. No non-default Git configuration is required; the vulnerability works against default git 2.39+ installations. User interaction is not required (UI:N) once the config is poisoned - hooks execute automatically on qualifying Git operations. |
| Impact | CVSS 7.8 (High) with vector AV:L/AC:L/PR:L/UI:N indicates local attack requiring low-privileged authentication and no user interaction. However, real-world risk is significantly elevated by three factors: (1) Publicly available exploit code exists with working PoC against GitPython 3.1.46 and git 2.39+, lowering exploitation barrier to script-kiddie level. (2) The vulnerability enables persistent config poisoning - injected hooks survive across sessions and affect all users of a shared repository, turning single-user local access into multi-user impact in collaborative environments. (3) GitPython is a transitive dependency in major ML/data platforms (MLRun, DVC, MLflow, Kedro) where application code often passes user-controlled author_name/author_email to set_value() without sanitization, as demonstrated in MLRun's project.push() audit. CVSS Local vector understates risk in SaaS/shared-server deployments where 'local' means any authenticated tenant. No EPSS or KEV data provided, but the combination of public POC, widespread dependency usage, and multi-tenant privilege escalation scenarios makes this a practical priority for organizations using affected ML platforms. Patch is available (3.1.49) and straightforward to deploy. Attack complexity is genuinely low - exploitation requires only the ability to set a config value with newline injection, no race conditions or memory corruption. |
| Exploit ScenarioDerived | An authenticated user with access to an MLRun API endpoint calls project.push() with a crafted author_name parameter containing 'Attacker\n[core]\nhooksPath=/tmp/malicious'. MLRun passes this unsanitized value to GitPython's config_writer().set_value('user', 'name', author_name), which writes the indented continuation to .git/config. The attacker uploads a pre-commit hook script to /tmp/malicious/pre-commit containing a reverse shell payload. When any other user (including administrators) performs a commit operation on that repository - either via the same MLRun API or direct git CLI access - Git executes the attacker's hook with the victim's privileges, achieving lateral movement and potential credential theft. In single-user scenarios, automated CI/CD pipelines invoking git commit trigger the payload without human interaction. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 06, 2026
Arbitrary code execution via Git hook redirection in GitPython 3.1.48 and earlier allows local authenticated users to inject malicious core.hooksPath configuration through newline characters in config_writer().set_value(). Publicly available exploit code exists. The vulnerability enables persistent repository poisoning where attacker-controlled hooks execute with the privileges of any user performing Git operations (commit, merge, checkout) on the poisoned repository. Particularly dangerous in multi-tenant environments like MLRun, DVC, MLflow, or Kedro where shared repositories enable privilege escalation across user contexts. Fixed in GitPython 3.1.49.
RemediationAI
Upgrade GitPython to version 3.1.49 or later, which implements input validation rejecting CR, LF, and NUL characters in config values (https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-v87r-6q3f-2j67). For applications unable to upgrade immediately, implement input validation at call sites: wrap all config_writer().set_value() calls with a check that raises ValueError if the value parameter contains newline or null bytes using regex pattern r'[\r\n\x00]'. Do not strip/replace characters - rejection is safer than normalization because silent stripping masks upstream injection attempts and may break legitimate use cases expecting validation errors. In multi-tenant environments (MLRun servers, shared Jupyter/ML platforms), audit all code paths passing user-supplied data to GitPython config operations, prioritizing author_name, author_email, commit messages, and branch names. As a defense-in-depth measure, run Git operations with core.hooksPath set to a read-only trusted directory via environment variable GIT_CONFIG_COUNT/GIT_CONFIG_KEY/GIT_CONFIG_VALUE, though this does not prevent config file poisoning and may break legitimate hook workflows. Review .git/config files in shared repositories for unexpected [core] sections or hooksPath directives as an incident response step.
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 Python library providing object model access to Git repositories, widely used by ML/data platforms (DVC, MLflow, Kedro, MLRun). The vulnerability (CWE-94: Improper Control of Generation of Code) exists in GitConfigParser.set_value(), which writes user-supplied values to .git/config via Python's configparser module. GitPython converts embedded newlines to indented continuation lines (\n becomes \n\t), but Git's config parser treats indented [section] headers as valid section starts. An attacker injects '\n[core]\nhooksPath=/attacker/path' into config values (e.g., user.name or user.email), which GitPython writes as indented lines but Git interprets as a core.hooksPath directive. The affected package per CPE is pkg:pip/gitpython versions ≤3.1.48. The root cause is missing input validation for control characters (CR/LF/NUL) before passing values to the configuration writer, creating a config injection vector that Git's lenient parser converts into executable directives.
Know when Python 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
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Primary rating from Vendor (https://github.com/gitpython-developers/GitPython).
CVSS VectorVendor: https://github.com/gitpython-developers/GitPython
DescriptionCVE.org
GitConfigParser.set_value() passes values to Python's configparser without validating for newlines. GitPython's own _write() converts embedded newlines into indented continuation lines (e.g. \n becomes \n\t), but Git still accepts an indented [core] stanza as a section header - so the injected core.hooksPath becomes effective configuration. Any Git operation that invokes hooks (commit, merge, checkout) will then execute scripts from the attacker-controlled path.
The vulnerability is not merely malformed config output: GitPython's own writer converts embedded newlines into indented continuation lines, but Git still accepts an indented [core] stanza as a section header, so the injected core.hooksPath becomes effective configuration.
This was found while auditing MLRun's project.push() method, which passes author_name and author_email directly to config_writer().set_value() with no sanitization. Both parameters cross a trust boundary - they are caller-supplied API inputs that end up in .git/config.
PoC (standalone, no MLRun required):
import git, subprocess, os
repo = git.Repo("/tmp/testrepo")
with repo.config_writer() as cw:
cw.set_value("user", "name", "foo\n[core]\nhooksPath=/tmp/hooks")
r = subprocess.run(["git", "config", "core.hooksPath"], cwd="/tmp/testrepo", capture_output=True, text=True)
assert r.returncode == 0
print(r.stdout.strip())
# /tmp/hooks
os.makedirs("/tmp/hooks", exist_ok=True)
open("/tmp/hooks/pre-commit", "w").write("#!/bin/sh\nid > /tmp/pwned\n")
os.chmod("/tmp/hooks/pre-commit", 0o755)
repo.index.add(["README"])
repo.git.commit(m="test")
print(open("/tmp/pwned").read())
# uid=...Tested on GitPython 3.1.46, git 2.39+.
Impact: This is persistent repo config poisoning. Any user who can supply author_name or author_email to an application calling config_writer().set_value() can redirect Git hook execution to an arbitrary path. In a multi-user or hosted environment (e.g. a shared MLRun server where multiple users push to the same repositories), one user can poison the .git/config of a shared repo and have their hooks run in the context of every subsequent Git operation by any user. On single-user deployments, the impact depends on whether the application later invokes Git hooks automatically.
Remediation: set_value() should raise on CR, LF, or NUL in values rather than silently pass them through:
import re
if isinstance(value, (str, bytes)) and re.search(r"[\r\n\x00]", str(value)):
raise ValueError("Git config values must not contain CR, LF, or NUL")Rejecting is safer than stripping - a stripped newline might indicate the caller is passing unsanitized input at a higher level, and silent normalization masks that.
Affected wherever config_writer().set_value(section, key, user_input) is called with external input.** GitPython is a dependency of DVC, MLflow, Kedro, and others - worth auditing their set_value() call sites for externally influenced inputs.
Executive ViewAI
GitPython versions 3.1.48 and earlier contain a critical code execution vulnerability that allows authenticated local attackers to inject malicious Git hooks, potentially compromising any user who performs Git operations on affected repositories. Organizations using GitPython in multi-tenant ML/data pipeline environments (MLRun, DVC, MLflow, Kedro) face elevated risk of privilege escalation and persistent repository compromise affecting shared infrastructure.
Vendor-released patch: GitPython 3.1.49. Until patching is complete: restrict local shell access to systems running vulnerable GitPython versions; implement strict file permissions (read-only) on .git/config in shared repositories; disable local Git hook execution where operationally feasible; enhance monitoring and alerting for unexpected processes spawned during Git operations; segregate multi-tenant repositories using containerization or separate file systems.
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
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Affected Products (CPE)CVE.org
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
Same weakness CWE-94 – Code Injection
View allVendor StatusVendor
SUSE
Severity: High| 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 |
| 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 High Performance Computing 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 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP7 | Fixed |
| SUSE Linux Enterprise Module for Python 3 15 SP7 | Fixed |
| SUSE Linux Enterprise Server 15 SP7 | Fixed |
| SUSE Linux Enterprise Server 16.0 | Fixed |
| SUSE Linux Enterprise Server 16.1 | Fixed |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | Fixed |
| SUSE Linux Enterprise Server for SAP applications 16.0 | Fixed |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP4 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP5 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS | Fixed |
| SUSE Linux Enterprise Module for Python 3 15 SP4 | Fixed |
| SUSE Linux Enterprise Module for Python 3 15 SP5 | Fixed |
| SUSE Linux Enterprise Module for Python 3 15 SP6 | Fixed |
| SUSE Linux Enterprise Server 15 SP4 | Fixed |
| SUSE Linux Enterprise Server 15 SP4-LTSS | Fixed |
| SUSE Linux Enterprise Server 15 SP5 | Fixed |
| SUSE Linux Enterprise Server 15 SP5-LTSS | Fixed |
| SUSE Linux Enterprise Server 15 SP6 | Fixed |
| SUSE Linux Enterprise Server 15 SP6-LTSS | Fixed |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | Fixed |
| SUSE Manager Proxy 4.3 | Fixed |
| SUSE Manager Retail Branch Server 4.3 | Fixed |
| SUSE Manager Server 4.3 | Fixed |
| SUSE Linux Enterprise Desktop 15 SP4 | Fixed |
| SUSE Linux Enterprise Desktop 15 SP5 | Fixed |
| SUSE Linux Enterprise Desktop 15 SP6 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP6 | Fixed |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | Fixed |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | Fixed |
| openSUSE Leap 15.4 | Fixed |
| openSUSE Leap 15.5 | Fixed |
| openSUSE Leap 15.6 | Fixed |
GHSA-v87r-6q3f-2j67
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB