---
schema_version: '1.0'
id: security-20260903-59271e
title: CVE-2026-78676 — gitpython
url: https://osv.dev/vulnerability/PYSEC-2026-3786
url_hash: 59271e35aebf9825caca5a1434630a434f44a985ea58ff4583dbccbbb7c64945
canonical_url: https://osv.dev/vulnerability/PYSEC-2026-3786
source: osv:pypa
category: security/library
category_raw: cve/library
region: null
tags:
- cve
- CVE-2026-78676
- PYSEC-2026-3786
- severity: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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- gitpython
- PyPI
lang: en
published_at: '2026-08-25T02:16:52Z'
fetched_at: '2026-09-03T11:30:56.205819Z'
updated_at: '2026-09-03T14:35:27Z'
status: published
content_hash: 92e027326dabf3633c18fcb878d1b24a4150dddaeeedcee481f1d033b7714c0e
content_changed_at: null
license_note: full
summary: '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 '
summary_source: rss
summary_en: '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 '
summary_omitted_reason: null
redistribution: true
keywords_en:
- cve
- CVE-2026-28684
- CVE-2026-78676
- gitpython
- library vulnerability
- PyPI
- PYSEC-2026-3786
- software security
entities_en:
- name: CVE-2026-28684
  type: event
topics_en:
- library vulnerability
- software security
numeric_facts: []
entities:
- name: CVE-2026-28684
  type: event
key_facts: []
related: []
related_auto: []
computed_at: '2026-09-03T14:34:28Z'
---

# CVE-2026-78676 — gitpython

## TL;DR
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 

## Key Points
- cve / CVE-2026-78676 / PYSEC-2026-3786 / severity: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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X / gitpython / PyPI

## Details
**Severity:** 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
**Advisory:** PYSEC-2026-3786 (CVE-2026-78676)

**Details:**
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.

**References:**
- https://www.vulncheck.com/advisories/gitpython-before-remote-code-execution-via-config-injection
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-284h-m62q-gf8w

_Data: OSV.dev (upstream: pypa) — https://osv.dev/vulnerability/PYSEC-2026-3786_

## Source
元記事: [CVE-2026-78676 — gitpython](https://osv.dev/vulnerability/PYSEC-2026-3786) — published 2026-08-25T02:16:52Z
