{"id":"CVE-2026-87817","published":"2026-09-09T11:21:04Z","modified":"2026-10-08T15:25:56Z","title":"GitPython before 3.1.60 Remote Code Execution via Git Directory Impersonation","vendor":"gitpython-developers","product":"GitPython","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00604,"percentile":0.43004,"provenance":"source"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-239g-whfq-7xj9","tags":["vendor-advisory"]},{"url":"https://www.vulncheck.com/advisories/gitpython-before-3.1.60-remote-code-execution-via-git-directory-impersonation","tags":["third-party-advisory"]}],"priority":{"score":14.8,"factors":[{"name":"EPSS percentile","points":8.6},{"name":"CVSS severity","points":6.16}]},"vendorSlug":"gitpython-developers","affectedVersions":[{"vendor":"gitpython-developers","product":"GitPython","versions":["< 3.1.60"]}],"fixedVersions":[{"vendor":"gitpython-developers","product":"GitPython","versions":["3.1.60"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total","timestamp":"2026-09-10T14:27:39.154180Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"gitpython","vulnerableRanges":["<3.1.60"],"patched":["3.1.60"],"from":["GHSA-239g-whfq-7xj9","PYSEC-2026-3982"],"provenance":"source"}],"summary":{"text":"GitPython before 3.1.60 fails to properly validate the location of the git directory, so tracked files such as gitdir, commondir, and HEAD can be used to impersonate it. An attacker who places a malicious pre-commit hook in the tracked hooks directory can execute arbitrary code when a victim calls index.commit() on a cloned or opened repository, which requires the victim to take that action.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:37:51Z"},"euvd":{"id":"EUVD-2026-74843","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-gitpython-developers-gitpython-cve-2022-24439","children":[{"from":"CVE-2026-87817","to":"CVE-2026-110855","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["git/repo/fun.py"],"commits":["https://github.com/gitpython-developers/GitPython/commit/9349ff58ee00c9fb14d515c8e693f33b2144b238","https://github.com/gitpython-developers/GitPython/commit/c7cf4d13b1ed0a2e70f2a1f3c6b4fc6c2652cf0b"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2026-73619","published":"2026-08-13","fixed":"3.1.57","kev":false},{"cve":"CVE-2026-73620","published":"2026-08-13","fixed":"3.1.57","kev":false},{"cve":"CVE-2026-76221","published":"2026-08-19","fixed":"3.1.58","kev":false,"link":{"from":"CVE-2026-76221","to":"CVE-2026-87817","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:gitpython","fromFixed":"3.1.58","toFixed":"3.1.60","daysApart":21}]}},{"cve":"CVE-2026-87817","published":"2026-09-09","fixed":"3.1.60","kev":false}],"package":"PyPI:gitpython"}}