PT-2026-88955 · Gitpython Developers+2 · Gitpython

·

CVE-2026-87817

·

Published

2026-08-26

·

Updated

2026-09-09

CVSS v2.0

10

High

VectorAV:N/AC:L/Au:N/C:C/I:C/A:C
🚨High - GitPython Git Directory Impersonation Code Execution (CVE-2026-87817)
GitPython versions before 3.1.60 fail to properly validate that a repository's git directory is legitimate, trusting tracked metadata files like gitdir, commondir, and HEAD without verification. This lets an attacker craft a repository that impersonates its own git directory.
By planting a malicious pre-commit hook inside the tracked hooks directory, the attacker gets it to execute the moment a victim calls index.commit() on the cloned or opened repository - turning a routine commit operation into arbitrary code execution.
Any application, CI pipeline, or script that uses GitPython to clone or open repositories from untrusted sources is exposed.
👉Upgrade to GitPython 3.1.60.

Exploit

Fix

Code Injection

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

BDU:2026-14474
CVE-2026-87817
GHSA-239G-WHFQ-7XJ9

Affected Products

Gitpython