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.
Published: 2026-08-25
Score: 9.3 Critical
EPSS: < 1% Very Low
KEV: No
Impact: Remote Code Execution via configuration injection
Action: Immediate Patch
AI Analysis

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.

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

Remediation

No vendor fix or workaround currently provided.

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

Fri, 04 Sep 2026 00:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Critical


Wed, 02 Sep 2026 19:30:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:python:*:*

Thu, 27 Aug 2026 06:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Tue, 25 Aug 2026 02:00:00 +0000

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'}


Subscriptions

Gitpython Project Gitpython
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-26T16:12:27.979Z

Reserved: 2026-08-25T01:17:12.262Z

Link: CVE-2026-78676

cve-icon Vulnrichment

Updated: 2026-08-26T16:08:07.046Z

cve-icon NVD

Status : Analyzed

Published: 2026-08-25T02:16:52.030

Modified: 2026-09-02T19:13:44.823

Link: CVE-2026-78676

cve-icon Redhat

Severity : Critical

Publid Date: 2026-08-25T01:30:33Z

Links: CVE-2026-78676 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-25T05:00:10Z

Weaknesses
  • CWE-88

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