CVE-2026-78676: GitPython before 3.1.59 Remote Code Execution via Config Injection
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.
Security readout for executives and security teams
Plain-English summary
A malicious Git configuration can remain harmless until GitPython writes an unrelated setting. Vulnerable versions may then transform hidden multiline content into active Git directives, potentially redirecting hooks and causing attacker-controlled code to run. Systems processing untrusted repositories or configuration files face the greatest concern.
Executive priority
Treat this as an urgent remediation item for internet-facing or automated repository-processing services. The potential impact covers confidentiality, integrity, and availability, but actual exposure requires vulnerable GitPython use and a relevant configuration workflow. Prioritize rapid inventory and upgrade rather than assuming every installation is immediately exploitable.
Technical view
GitPython versions before 3.1.59 do not safely re-serialize multiline git-config values during writes. A crafted quoted value containing newlines can become separate directives, including core.hooksPath, after a later GitPython configuration write. Subsequent Git hook invocation can enable arbitrary code execution. The issue is classified as CWE-88 with CVSS 3.1 score 9.8.
Likely exposure
Exposure is most likely where GitPython before 3.1.59 handles attacker-controlled or untrusted repositories and performs configuration writes. Risk depends on both the crafted configuration being present and later behavior activating an injected directive, such as invoking a redirected Git hook. The supplied sources do not identify specific downstream applications or deployments.
Exploitation context
The CVSS assessment describes network-reachable, low-complexity exploitation without privileges or user interaction. However, the source bundle does not report known active exploitation, and the CVE is not listed as KEV. Treat exploit availability and observed attacks as unconfirmed.
Researcher notes
The critical transition occurs during serialization: dormant quoted multiline data becomes active configuration when GitPython performs a write. Assess trust boundaries around repository acquisition, configuration mutation, and later hook execution. The supplied evidence supports the vulnerability mechanism and fixed-version boundary, but does not establish public exploit code, exploitation campaigns, or affected downstream products.
Mitigation direction
Upgrade GitPython to version 3.1.59 or later.
Prioritize systems that process repositories or Git configuration from untrusted sources.
Restrict untrusted repository ingestion until affected deployments are upgraded.
Consult the GitPython vendor advisory for current remediation guidance.
Validation and detection
Inventory installed GitPython versions and identify releases earlier than 3.1.59.
Locate workflows where GitPython writes repository or global Git configuration.
Identify services accepting repositories or configuration files from untrusted parties.
Review relevant configurations for unexpected multiline values or hook-path directives.
Confirm upgraded environments no longer use vulnerable GitPython releases.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · medium confidence lookup
CWE-88: Command execution behavior lookup
Command injection weaknesses can lead defenders to review execution techniques and command interpreter telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
2CVSS vectors
3Timeline events
1ADP providers
3Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: yesTechnical Impact: total
CVSS vector scores
2 official scores
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-88 · source CWE mapping
Improper Neutralization of Argument Delimiters in a Command
Improper Neutralization of Argument Delimiters in a Command represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.