cve.bz

CVE-2026-76221 gitpython project gitpython: Injection

8.7 highExploit referenceEPSS 0.5%Fix available

High (8.7) in gitpython project gitpython. EPSS 0.5% estimated probability of exploitation activity in the next 30 days. Fixed in gitpython 3.1.58.

On this page
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.

Severity

CVSS 4.0

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

CVSS 3.1

8.8 high
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
0.5% (unchanged from 0.5% a week ago; 0.8% 30 days ago) estimated probability of exploitation activity in the next 30 days; 42nd percentile. Scored 2026-11-17. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2026-08-20. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component (Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-76221 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-76221?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-76221?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-76221 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
gitpython-developers GitPythonbefore 3.1.58

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-jm78-9fvv-mhgrPyPIgitpython<3.1.583.1.58
PYSEC-2026-3783PyPIgitpython<3.1.583.1.58

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12python-git3.1.30-1+deb12u3DEBIAN-CVE-2026-76221
Debian13python-git3.1.44-1+deb13u1DEBIAN-CVE-2026-76221
Debian14python-git3.1.61-1DEBIAN-CVE-2026-76221
Ubuntu26.10, Pro:14.04:LTS, Pro:16.04:LTS and 5 morepython-gitno fix listedUBUNTU-CVE-2026-76221
Red Hatsatellite:6.19::el9, satellite_capsule:6.19::el9ansible-core, ansible-test1:2.16.19-1.el9satRHSA-2026:63385
Red Hatsatellite:6.19::el9, satellite_capsule:6.19::el9openvox-server0:8.15.2-1.el9satRHSA-2026:63385
Red Hatsatellite:6.19::el9, satellite_capsule:6.19::el9python3.12-aiohttp, python3.12-aiohttp-debuginfo, python3.12-aiohttp-debugsource0:3.14.3-1.el9pcRHSA-2026:63385
Red Hatsatellite:6.19::el9, satellite_capsule:6.19::el9python3.12-gitpython0:3.1.59-1.el9pcRHSA-2026:63385
Red Hatsatellite:6.19::el9, satellite_capsule:6.19::el9, satellite_utils:6.19::el9rubygem-jwt0:2.10.3-1.el9satRHSA-2026:63385
Red Hatsatellite_maintenance:6.19::el9ansible-core1:2.16.19-1.el9satRHSA-2026:63385
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSS, Linux Enterprise High Performance Computing 15 SP5-ESPOS and 8 morepython-GitPython3.1.34.1693646983.2a2ae77-150400.9.8.1SUSE-SU-2026:4072-1
openSUSELeap 16.0python-GitPython3.1.44-160000.4.1openSUSE-SU-2026:21874-1
openSUSETumbleweedpython-GitPython3.1.59-2.1openSUSE-SU-2026:11566-1
Alpinev3.24py3-gitpython3.1.61-r0ALPINE-CVE-2026-76221

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Important.

Red Hat's statement

GitPython's option-name validator fails to neutralize equals signs, hash symbols, and whitespace in option names, letting an attacker who controls option names forge arbitrary git-config directives (e.g. `sshCommand = touch /tmp/RCE #`) that execute arbitrary commands via core.sshCommand or core.hooksPath on the next git operation, fixed in 3.1.58. Red Hat products that bundle GitPython use it as an internal build/automation-time dependency and do not expose git option names to adversary-controlled input; the vulnerable input cannot be controlled by an attacker in these products, so they are marked not affected. GitPython as shipped in Red Hat OpenStack Platform 16.2 and 17.1 contains the vulnerable library code and retains its affected determination.

Red Hat's mitigation

Do not pass untrusted or attacker-influenced git option names to GitPython. Upgrade to GitPython 3.1.58 or later, where option-name (config) injection is fixed.

ProductPackageStateAdvisory
Red Hat Satellite 6.19 for RHEL 9python3.12-gitpython-0:3.1.59-1.el9pcFixed 2026-09-03RHSA-2026:63385
Red Hat Ansible Automation Platform 2.5ansible-automation-platform-25/controller-rhel8:1789607021Fixed 2026-09-23RHSA-2026:71210
Red Hat Ansible Automation Platform 2.6ansible-automation-platform-26/controller-rhel9:1789673739Fixed 2026-09-23RHSA-2026:71179
Red Hat Ansible Automation Platform 2.7ansible-automation-platform-27/controller-rhel9:1789580684Fixed 2026-09-23RHSA-2026:71177
Red Hat Ansible Automation Platform 2.7ansible-automation-platform-27/hub-rhel9:1791254555Fixed 2026-10-08RHSA-2026:79378
Red Hat Satellite 6.18satellite/iop-vmaas-rhel9:1789611858Fixed 2026-09-17RHSA-2026:68764
Red Hat Satellite 6.18satellite/iop-vulnerability-engine-rhel9:1789637082Fixed 2026-09-17RHSA-2026:68771
Red Hat Satellite 6.19satellite/iop-vulnerability-engine-rhel9:1789607605Fixed 2026-09-17RHSA-2026:68776
Red Hat Satellite 6.19satellite/iop-vmaas-rhel9:1789611998Fixed 2026-09-17RHSA-2026:68780
Exploit Intelligenceexploit-intelligence-tech-preview/vulnerability-analysis-rhel9Not affected
Exploit Intelligenceexploit-intelligence/vulnerability-analysis-rhel9Not affected
Migration Toolkit for Applications 8mta/mta-solution-server-rhel9Not affected
Pen Drive Powered by Red Hat Lightspeedpen-drive/pen-drive-scanner-rhel9Not affected
Red Hat AI Inference Serverrhaiis/vllm-cpu-rhel9Not affected
Red Hat AI Inference Serverrhaiis/vllm-tpu-rhel9Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-24/controller-rhel8Will not fix
Red Hat Ansible Automation Platform 2ansible-automation-platform-24/hub-rhel8Will not fix
Red Hat Ansible Automation Platform 2ansible-automation-platform-25/hub-rhel8Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-26/hub-rhel9Not affected
Red Hat Ansible Automation Platform 2python3.11-gitpythonNot affected
50 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-76221.

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-74 (37).

References

Check your stackJSON