Security mailing lists by PureSourceCode

CVE-2026-87817

HIGH 8.7CVSS 4.0

GitPython: Repository content can impersonate the git directory, leading to arbitrary code execution

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.

Published
9 Sep 2026
Last modified
30 Sep 2026
Assigned by
disclosure@vulncheck.com
NVD status
Analyzed
Weakness
CWE-427CWE-94
Also known as
GHSA-239g-whfq-7xj9PYSEC-2026-3982
Sources
NVDJSONOSV GHSA-239g-whfq-7xj9JSONOSV PYSEC-2026-3982JSON

Scores

SourceScored byVersionScoreVector / decision
NVD disclosure@vulncheck.com (Secondary) CVSS 4.0 HIGH 8.7 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
OSV PyPA CVSS 4.0 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
NVD disclosure@vulncheck.com (Secondary) CVSS 3.1 HIGH 8.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
OSV GitHub CVSS 3.1 HIGH 8.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD gitpython_project gitpython
cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:python:*:*
< 3.1.60 3.1.60
OSV PyPI gitpython < 3.1.60 3.1.60

References

History

  • 25 Nov 2026 21:05 UTC · NVD: first stored (published 9 Sep 2026)
  • 25 Nov 2026 20:12 UTC · OSV: first stored (published 9 Sep 2026)
  • 25 Nov 2026 20:11 UTC · OSV: first stored (published 30 Sep 2026)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.