CVE-2026-78676
Received Received - Intake

GitPython Config Write Arbitrary Code Execution via Malicious Git Config

Vulnerability report for CVE-2026-78676, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-25

Last updated on: 2026-08-25

Assigner: VulnCheck

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 Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-25
Last Modified
2026-08-25
Generated
2026-08-25
AI Q&A
2026-08-25
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 2 associated CPEs
Vendor Product Version / Range
gitpython gitpython to 3.1.59 (exc)
gitpython_developers gitpython to 3.1.59 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-88 The product constructs a string for a command to be executed by a separate component in another control sphere, but it does not properly delimit the intended arguments, options, or switches within that command string.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

CVE-2026-78676 is a high-severity vulnerability in GitPython versions before 3.1.59. It allows remote code execution through a config injection attack. The issue occurs when GitPython corrupts dormant multi-line git-config values during write operations, transforming them into executable 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.

Detection Guidance

To detect this vulnerability, inspect GitPython versions in use with: pip show GitPython. Check for multi-line config values in .git/config or included files that could contain embedded newlines. Use git config --list --show-origin to review active config directives. Look for suspicious hooksPath or similar directives pointing to unexpected paths.

Impact Analysis

This vulnerability can allow attackers to execute arbitrary code on your system if you use a vulnerable version of GitPython to modify Git config files. Attackers can inject malicious directives into config files by embedding newlines in values. When GitPython rewrites the config, these dormant values become active, enabling execution of attacker-controlled hooks during normal Git operations like commits.

Compliance Impact

This vulnerability could lead to unauthorized code execution via Git hooks, potentially allowing attackers to access, modify, or exfiltrate sensitive data. For GDPR, this may result in violations of data integrity and confidentiality. For HIPAA, it could compromise protected health information if exploited in healthcare environments.

Mitigation Strategies

Upgrade GitPython to version 3.1.59 or later immediately. Avoid using GitPython to modify Git config files until patched. If config writes are necessary, use git's native config tools instead. Review all .git/config and included files for multi-line values with embedded newlines.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-78676. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart