CVE-2026-76221
PoC largeConfig-name injection in GitPython enables command execution via git config
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.
| gitpython project GitPython | all versions before 3.1.58 |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
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 news0 stories
No ingested article mentions this CVE yet.