ZeroHour

CVE-2026-76221

PoC large

Config-name injection in GitPython enables command execution via git config

CVSS 4.0
8.7 high
EPSS
<1%p40
Published
()
Modified
AI analysis

GitPython before 3.1.58 contains a config-name injection flaw (CWE-74) in its option-name validator, allowing equals signs, hash symbols, and whitespace to be smuggled into git-config option names. When an attacker can influence an option name, an injected string such as 'sshCommand = touch /tmp/RCE #' forges additional git-config directives beyond the intended one. On the next git operation, the forged core.sshCommand or core.hooksPath directives cause attacker-controlled commands to execute on the host running GitPython, yielding code execution with the privileges of that process. Any application, automation, or tooling embedding vulnerable GitPython versions where low-privileged attackers can shape git-config option names is affected. Exploitation has not been observed at scale: there is one public proof-of-concept advisory (GHSA-jm78-9fvv-mhgr), EPSS is 0.5% (40th percentile), and the flaw is not in CISA's KEV catalog.

What to do: Upgrade GitPython to 3.1.58 or later, which fixes the option-name validator. Audit code paths where git-config option names come from untrusted sources (repository data, remotes, or user input) and restrict what option names are passed to GitPython until patched.

Affected
gitpython project GitPythonall versions before 3.1.58
Estimated exposure
largelikely hundreds of thousands of Python environments and CI/automation deployments (widely used Git library) — GitPython is a very widely deployed Python library embedded in developer tooling, CI pipelines, and git-automation scripts, so vulnerable installations plausibly number in the hundreds of thousands, though only a subset expose…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

GitPython before 3.1.58 contains a config-name injection vulnerability in the option-name validator that allows attackers to forge arbitrary git-config directives by injecting equals signs, hash symbols, and whitespace into option names. Attackers can inject malicious option names like 'sshCommand = touch /tmp/RCE #' to execute arbitrary commands via core.sshCommand or core.hooksPath on the next git operation.

Vendors
gitpython project
Products
gitpython
Weakness
CWE-74
Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

In the news

No ingested article mentions this CVE yet.