CVE-2026-87817

    Dashboard / Vulnerabilities / CVE-2026-87817

    CVE-2026-87817

    Published: 9 Sept 2026Last Modified: 12 Sept 2026

    Summary: GitPython before 3.1.60 Remote Code Execution via Git Directory Impersonation

    Details: 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.

    Affected packages

    Package

    Name:

    Purl:

    Affected ranges

    Type: GIT

    Events:

    Affected versions

    3.1.57
    3.1.56
    3.1.55
    3.1.54
    3.1.53
    3.1.52
    3.1.51
    3.1.50
    3.1.49
    3.1.48
    3.1.47
    3.1.44
    3.1.43
    3.1.42
    3.1.41
    3.1.40
    3.1.38
    3.1.35
    3.1.34
    3.1.33
    3.1.32
    3.1.31
    3.1.30
    3.1.29
    3.1.28
    3.1.27
    3.1.26
    3.1.25
    3.1.24
    3.1.23
    3.1.22
    3.1.20
    3.1.19
    3.1.18
    3.1.17
    3.1.16
    3.1.13
    3.1.12
    3.1.11
    3.1.10
    3.1.9
    3.1.8
    3.1.7
    3.1.6
    3.1.5
    3.1.4
    3.1.3
    3.1.2
    3.1.1
    3.1.0

    Common Vulnerability Scoring System

    Attack Vector
    Network
    Adjacent
    Local
    Physical
    Privileges Required
    None
    Low
    High
    User Interaction
    None
    Required
    Scope
    Unchanged
    Changed
    Confidentiality
    None
    Low
    High
    Integrity
    None
    Low
    High
    Availability
    None
    Low
    High
    CVE-2026-87817 | CVE-DB