cve.bz

CVE-2026-87817

8.7 highEPSS 0.4%

High (8.7) in gitpython project gitpython. EPSS 0.4% chance of exploitation in the next 30 days. Fixed in gitpython 3.1.60.

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.

Severity

CVSS 4.0

8.7 high
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

CVSS 3.1

8.8 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS
0.4% chance of exploitation in the next 30 days; higher than 36% of CVEs (scores of 2026-10-31)
CWE
CWE-94
Published
Modified
Record from
the NVD, synced

Affected

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-239g-whfq-7xj9PyPIgitpython<3.1.603.1.60
PYSEC-2026-3982PyPIgitpython<3.1.603.1.60

References

Check your stackJSON