---
schema_version: '1.0'
id: security-20260714-3d4f5e
url: https://osv.dev/vulnerability/PYSEC-2026-2161
url_hash: 3d4f5e175b706cd1d31f7cc9ee4e23c4de89a01887a7aed4d98c824aab055c29
canonical_url: https://osv.dev/vulnerability/PYSEC-2026-2161
source: osv:pypa
category: security/library
category_raw: cve/library
region: null
tags:
- cve
- CVE-2026-42284
- PYSEC-2026-2161
- severity:CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- gitpython
- PyPI
lang: en
published_at: '2026-05-07T19:16:01Z'
fetched_at: '2026-07-14T06:42:23Z'
updated_at: '2026-07-14T06:43:41Z'
status: published
content_hash: f88d623ac9ce0545f71870a97480a503d6b280dc5898b6f1a49d64db7b7704fa
license_note: full
summary: GitPython is a python library used to interact with Git repositories. Prior
  to version 3.1.47, _clone() validates multi_options as the original list, then executes
  shlex.split(" ".join(multi_options)). A string like "--branch main --config core.hooksPath=/x"
  passes validation (st
summary_source: rss
summary_en: GitPython is a python library used to interact with Git repositories.
  Prior to version 3.1.47, _clone() validates multi_options as the original list,
  then executes shlex.split(" ".join(multi_options)). A string like "--branch main
  --config core.hooksPath=/x" passes validation (st
entities: []
key_facts: []
related: []
related_auto: []
title: CVE-2026-42284 — gitpython
---

# CVE-2026-42284 — gitpython

## TL;DR
GitPython is a python library used to interact with Git repositories. Prior to version 3.1.47, _clone() validates multi_options as the original list, then executes shlex.split(" ".join(multi_options)). A string like "--branch main --config core.hooksPath=/x" passes validation (st

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

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

**Affected (your watchlist):**
- `PyPI:gitpython` 3.1.46 → fixed in 3.1.47 [docker/docker-llmwiki]

**Details:**
GitPython is a python library used to interact with Git repositories. Prior to version 3.1.47, _clone() validates multi_options as the original list, then executes shlex.split(" ".join(multi_options)). A string like "--branch main --config core.hooksPath=/x" passes validation (starts with --branch), but after split becomes ["--branch", "main", "--config", "core.hooksPath=/x"]. Git applies the config and executes attacker hooks during clone. This issue has been patched in version 3.1.47.

**References:**
- https://www.tenable.com/cve/CVE-2026-32686
- https://github.com/gitpython-developers/GitPython/releases/tag/3.1.47
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-x2qx-6953-8485

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

## Source
元記事: [CVE-2026-42284 — gitpython](https://osv.dev/vulnerability/PYSEC-2026-2161) — published 2026-05-07T19:16:01Z
