Skip to main content
EPSS 0.8%top 46%

CVE-2026-78676: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') in gitpython-developers GitPython

0
Critical
Published: 08/25/2026 (08/25/2026, 01:30:33 UTC)
Source: CVE Database V5
Vendor/Project: gitpython-developers
Product: GitPython

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.

CVSS v4.0

Score 9.3critical

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

Affected software

gitpython-developers

GitPython

Affected versions
>=0 <3.1.59
gitpython
pkg:pypi/gitpython
Affected versions
<3.1.59

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/18/2026, 01:53:07 UTC

Technical Analysis

GitPython's GitConfigParser reads multi-line config values using standard git syntax, decoding escape sequences into embedded newlines. However, when rewriting the config file, GitPython uses an unsafe serialization method that replaces embedded newlines with a newline plus tab without proper quoting or continuation markers. This causes the second line of a multi-line value to be interpreted as a new config directive on subsequent reads. An attacker can craft a dormant multi-line config value that, after a legitimate config write operation by GitPython, injects a new core.hooksPath directive pointing to attacker-controlled hooks. Since Git hooks are executed by many git operations, this leads to arbitrary code execution. The vulnerability exists because the injection guard only applies to write-time arguments, not to values read from disk and rewritten. The affected version is GitPython 3.1.58 and earlier, fixed in 3.1.59.

Potential Impact

An attacker who can place a specially crafted multi-line config value in a Git repository's config file or an included config file can cause GitPython to rewrite the config file in a way that injects a new core.hooksPath directive. This directive controls the path for Git hooks, which are executed by many Git commands. As a result, arbitrary code execution can occur when the host application or user performs any hook-triggering Git operation. The vulnerability is critical due to the potential for remote code execution without authentication or user interaction.

Mitigation Recommendations

A fix is available in GitPython version 3.1.59 that addresses this issue by correcting the unsafe re-serialization of multi-line config values. Users should upgrade to GitPython 3.1.59 or later. Until upgraded, avoid performing config write operations on repositories with untrusted or attacker-controlled multi-line config values. Review and sanitize any included config files to ensure they do not contain malicious multi-line values. No other mitigations are documented by the vendor.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
VulnCheck
Date Reserved
2026-08-25T01:17:12.262Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6a8cf57dacd9273b498428dc

Added to database: 08/25/2026, 01:53:01 UTC

Last enriched: 09/18/2026, 01:53:07 UTC

Last updated: 10/09/2026, 06:48:19 UTC

Views: 169

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses