CVE-2026-78676

GitPython before 3.1.59 Remote Code Execution via Config Injection

Published Aug 25, 2026 CVSS 4.0 · 9.3 Critical EPSS < 1% KEV · Not listed
Description
GitPython before 3.1.59 fails to safely re-serialize multi-line git-config values during write operations, corrupting dormant quoted values into injected directives like core.hooksPath. Attackers can craft config files with embedded newlines that become live git directives after any unrelated GitPython config write, enabling arbitrary code execution via hook invocation.

Analysis

AI-generated

Technical impact

GitPython versions prior to 3.1.59 contain a flaw that fails to safely re‑serialize multi‑line git‑config values during write operations, corrupting dormant quoted values into injected directives such as core.hooksPath. When an attacker crafts a config file with embedded newlines, those newlines become live git directives after any unrelated GitPython config write, allowing arbitrary code execution by invoking a hook.

Affected Systems

The affected product is GitPython, any installation of the gitpython‑developers library with a version older than 3.1.59. Upgrading to 3.1.59 or later removes the vulnerability.

Risk and Exploitability

The CVSS score of 9.3 indicates a high severity impact. EPSS is not reported, and the vulnerability is not yet listed in CISA KEV. The likely attack vector is a local attacker or one with write access to a repository’s configuration, who can inject malicious directives that are subsequently executed when GitPython writes any config entry. While the description does not state the exploitation requires network access, the local nature of config modification suggests that compromise or privilege escalation may be required to execute the payload.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade GitPython to version 3.1.59 or later to address the config injection flaw.
  • If upgrading is not immediately possible, restrict or remove any repository configuration files that contain multi‑line values, and ensure that only trusted users can write to git‑config files.
  • Deploy monitoring on processes that invoke GitPython hooks to detect unexpected or unauthorized hook execution.

Generated by OpenCVE AI on August 25, 2026 at 04:35 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4872-1 python-git security update
Github GHSA Github GHSA GHSA-284h-m62q-gf8w GitPython: Dormant multi-line git-config values are corrupted into live injected directives (e.g. core.hooksPath) on any unrelated GitConfigParser write, enabling RCE
History
Type Values Removed Values Added
CPEs cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:python:*:*
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
Description GitPython before 3.1.59 fails to safely re-serialize multi-line git-config values during write operations, corrupting dormant quoted values into injected directives like core.hooksPath. Attackers can craft config files with embedded newlines that become live git directives after any unrelated GitPython config write, enabling arbitrary code execution via hook invocation.
Title GitPython before 3.1.59 Remote Code Execution via Config Injection
First Time appeared Gitpython Project
Gitpython Project gitpython
Weaknesses CWE-88
CPEs cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:*:*:*
Vendors & Products Gitpython Project
Gitpython Project gitpython
References
Metrics cvssV3_1

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

cvssV4_0

{'score': 9.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-88

    Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Oct 8, 2026, 3:25 PM
Reserved
Aug 25, 2026, 1:17 AM
Status
Analyzed
Published
Aug 25, 2026, 2:16 AM
Modified
Oct 12, 2026, 3:10 PM
Severity
Critical
Public date
Aug 25, 2026, 1:30 AM