Live threats

All CVEs / Gitpython Project

CVE-2026-42284Gitpython Project Gitpython

Critical 9.8 No auth needed

Priority
74
CVSS 3.1
9.8
EPSS
—
Auth required
No
Published
May 7, 2026
Updated
Nov 11, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-88
SSVC (CISA)
Exploitation: proof of concept · Automatable: no · Technical impact: total
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Gitpython.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
PyPI gitpython < 3.1.47 3.1.47 pip install "gitpython>=3.1.47"
PyPI gitpython < 3.1.47 3.1.47 pip install "gitpython>=3.1.47"

Per OSV / GitHub Advisories (GHSA-x2qx-6953-8485, PYSEC-2026-2161). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
gitpython_projectgitpython< 3.1.47

Official advisories

Also: Red Hat (+3)

Vendor, CERT and distribution advisories that name this CVE. Original titles.

Official sources

References

Links published by the sources. Open them with care.