Machine-written summary
Summary written by Claude Haiku from the source advisory. Not reviewed by a person.
GitPython versions before 3.1.60 can mis-resolve the git directory when a repository's root contains tracked files named HEAD, objects/, refs/, config, gitdir, commondir and hooks/, which git allows. An attacker who supplies such a repository can get a victim who opens or clones it, and then commits through GitPython, to run commands via a hook, or read files outside the repository through its config. Upgrade to GitPython 3.1.60 or later; the source gives no other workaround.
Not analysed yet
We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.
Severity and exploitation
| Score | Rating | CVSS | Vector | Source |
|---|---|---|---|---|
| 8.7 | High | 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 | CNA (VulnCheck) |
- CISA KEV Not listed.
- EPSS 0.0042, the 36th percentile, on 5 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.
Timeline
- 31 Oct 2026, 14:09 UTC First seen by agentprime
- 31 Oct 2026, 14:09 UTC Confirmed by OSV
Sources
- GitHub Advisory Database: GHSA-239g-whfq-7xj9
- OSV: GHSA-239g-whfq-7xj9
- github.com/gitpython-developers/GitPython/security/advisories/GHSA-239g-whfq-7xj9
- nvd.nist.gov/vuln/detail/CVE-2026-87817
- github.com/gitpython-developers/GitPython/pull/2218
- github.com/gitpython-developers/GitPython/commit/c7cf4d13b1ed0a2e70f2a1f3c6b4fc6c2652cf0b
- github.com/gitpython-developers/GitPython
- github.com/gitpython-developers/GitPython/releases/tag/3.1.60
- github.com/pypa/advisory-database/tree/main/vulns/gitpython/PYSEC-2026-3982.yaml
- www.vulncheck.com/advisories/gitpython-before-3.1.60-remote-code-execution-via-git-directory-impersonation