CVE-2026-76221

GitPython before 3.1.58 Config Injection via option-name

Published Aug 19, 2026 CVSS 4.0 · 8.7 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

GitPython versions earlier than 3.1.58 contain a config-name injection flaw that allows an attacker to craft malicious option names containing equals signs, hash symbols, or whitespace. By inserting malicious option names such as 'sshCommand = touch /tmp/RCE #' the attacker can cause git operations to execute arbitrary commands through the core.sshCommand or core.hooksPath directives. This results in complete compromise of the host when a git command is run, exposing the system to full remote code execution.

Affected Systems

The vulnerability affects the GitPython library, maintained by the gitpython‑developers. Any installation running a version older than 3.1.58 is susceptible; this includes all environments that embed GitPython, such as Python applications that use GitPython for repository management or automated deployment scripts.

Risk and Exploitability

The CVSS score of 8.7 classifies this as a high‑severity flaw. The EPSS score is < 1%, indicating a very low likelihood of exploitation. The issue is not listed in the CISA KEV catalog, suggesting no widespread exploitation has been observed. However, the flaw requires the attacker to supply a crafted git‑config entry, making local or privileged access the most likely attack vector. If an attacker can influence configuration files or environment variables, remote command execution can be achieved with little to no user interaction on the target.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade GitPython to 3.1.58 or later to remove the vulnerable validator.
  • Verify that all git‑config files used by the application contain only allowed option names and remove any entries with embedded equals signs, hash marks, or leading/trailing whitespace.
  • If upgrade is delayed, disable or remove the core.sshCommand and core.hooksPath settings from all configuration files to prevent accidental command execution.

Generated by OpenCVE AI on August 28, 2026 at 19:39 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4872-1 python-git security update
History
Type Values Removed Values Added
CPEs cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:python:*:*
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title GitPython before 3.1.58 Config Injection via option-name
First Time appeared Gitpython Project
Gitpython Project gitpython
Weaknesses CWE-74
CPEs cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:*:*:*
Vendors & Products Gitpython Project
Gitpython Project gitpython
References
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 8.7, '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'}

Weaknesses
  • CWE-74

    Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')

  • CWE-78

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Oct 8, 2026, 3:25 PM
Reserved
Aug 19, 2026, 11:35 AM
Status
Analyzed
Published
Aug 19, 2026, 2:17 PM
Modified
Oct 24, 2026, 1:10 PM
Severity
Important
Public date
Aug 19, 2026, 2:02 PM