---
schema_version: '1.0'
id: security-20260917-9cd08f
title: CVE-2026-67326 — gitpython
url: https://osv.dev/vulnerability/PYSEC-2026-3980
url_hash: 9cd08f788c07c35f2526389ac446c557817f84a03dd6e175e4a59168bc8d1b81
canonical_url: https://osv.dev/vulnerability/PYSEC-2026-3980
source: osv:pypa
category: security/library
category_raw: cve/library
region: null
tags:
- cve
- CVE-2026-67326
- PYSEC-2026-3980
- severity:CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- gitpython
- PyPI
lang: en
published_at: '2026-08-01T13:17:03Z'
fetched_at: '2026-09-17T16:07:53.996627Z'
updated_at: '2026-09-17T16:15:28Z'
status: published
content_hash: 9b39a26b6c2a540692b94991d9d24a34ddae653298356b1bb1780a5fc545f23b
content_changed_at: null
license_note: full
summary: GitPython before 3.1.50 fails to validate newline characters in the section
  parameter of config_writer(), allowing attackers to inject arbitrary section headers
  into .git/config. Attackers can inject newlines to create a forged [core] section
  with hooksPath pointing to attacker-c
summary_source: rss
summary_en: GitPython before 3.1.50 fails to validate newline characters in the section
  parameter of config_writer(), allowing attackers to inject arbitrary section headers
  into .git/config. Attackers can inject newlines to create a forged [core] section
  with hooksPath pointing to attacker-c
summary_omitted_reason: null
redistribution: true
keywords_en:
- cve
- CVE-2025-69230
- CVE-2026-67326
- gitpython
- library vulnerability
- PyPI
- PyPI:click
- PYSEC-2026-3980
- severity:CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- software security
entities_en:
- name: CVE-2025-69230
  type: event
- name: PyPI:click
  type: artifact
topics_en:
- library vulnerability
- software security
numeric_facts: []
entities:
- name: CVE-2025-69230
  type: event
- name: PyPI:click
  type: artifact
key_facts: []
related: []
related_auto:
- name: CVE-2026-40347
  type: event
  weight: 1.0
- name: CVE-2026-21441
  type: event
  weight: 1.0
- name: portal
  type: organization
  weight: 1.0
computed_at: '2026-09-17T16:15:21Z'
---

# CVE-2026-67326 — gitpython

## TL;DR
GitPython before 3.1.50 fails to validate newline characters in the section parameter of config_writer(), allowing attackers to inject arbitrary section headers into .git/config. Attackers can inject newlines to create a forged [core] section with hooksPath pointing to attacker-c

## Key Points
- cve / CVE-2026-67326 / PYSEC-2026-3980 / severity:CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H / gitpython / PyPI

## Details
**Severity:** CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
**Advisory:** PYSEC-2026-3980 (CVE-2026-67326)

**Details:**
GitPython before 3.1.50 fails to validate newline characters in the section parameter of config_writer(), allowing attackers to inject arbitrary section headers into .git/config. Attackers can inject newlines to create a forged [core] section with hooksPath pointing to attacker-controlled directories, achieving remote code execution when git hooks are triggered.

**References:**
- https://www.vulncheck.com/advisories/gitpython-before-newline-injection-via-config-writer-section
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-mv93-w799-cj2w

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

## Source
元記事: [CVE-2026-67326 — gitpython](https://osv.dev/vulnerability/PYSEC-2026-3980) — published 2026-08-01T13:17:03Z
