{"cve":"CVE-2026-87817","nvd":{"published":"2026-09-09T12:17:16.830","modified":"2026-09-16T15:24:41.533","status":"Analyzed","description":"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.","cvss_v4":{"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","score":8.7},"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8},"cwes":["CWE-94"],"references":["https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-239g-whfq-7xj9","https://www.vulncheck.com/advisories/gitpython-before-3.1.60-remote-code-execution-via-git-directory-impersonation"],"products":["gitpython_project:gitpython"],"source":"nvd","synced_at":"2026-10-19T22:52:53.108888569+00:00"},"epss":{"cve":"CVE-2026-87817","score":0.00419,"percentile":0.3625,"date":"2026-11-01"},"kev":null,"osv":[{"id":"GHSA-239g-whfq-7xj9","url":"https://osv.dev/vulnerability/GHSA-239g-whfq-7xj9","summary":"GitPython: Repository content can impersonate the git directory, leading to arbitrary code execution","modified":"2026-09-30T23:45:04.022111787Z","packages":[{"ecosystem":"PyPI","name":"gitpython","purl":"pkg:pypi/gitpython","ranges":["<3.1.60"],"fixed":["3.1.60"]}]},{"id":"PYSEC-2026-3982","url":"https://osv.dev/vulnerability/PYSEC-2026-3982","summary":"","modified":"2026-09-17T09:00:03.355630821Z","packages":[{"ecosystem":"PyPI","name":"gitpython","purl":"pkg:pypi/gitpython","ranges":["<3.1.60"],"fixed":["3.1.60"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}