Live threats

All CVEs / Gitpython Project

CVE-2026-87817Gitpython Project Gitpython

High 8.7 No auth needed

Priority
67
CVSS 4.0
8.7
EPSS
—
Auth required
No
Published
Sep 9, 2026
Updated
Sep 16, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-94
SSVC (CISA)
Exploitation: none · Automatable: yes · Technical impact: total
Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/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

What happens

GitPython before 3.1.60 fails to properly validate the git directory location, allowing attackers to impersonate the git directory using tracked files like gitdir, commondir, and HEAD. Attackers can execute arbitrary code by placing a malicious pre-commit hook in the tracked hooks directory that executes when a victim calls index.commit() on a cloned or opened repository.

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.60 3.1.60 pip install "gitpython>=3.1.60"
PyPI gitpython < 3.1.60 3.1.60 pip install "gitpython>=3.1.60"

Per OSV / GitHub Advisories (GHSA-239g-whfq-7xj9, PYSEC-2026-3982). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
gitpython_projectgitpython< 3.1.60

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.