CVE catalog

CVE-2026-87817

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 e

[CVE catalog]

Severity
High · CVSS 8.8CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Published
Updated
Source
[NVD] · [CVE record]
EPSS
0.42% · Oct 25, 2026

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.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debianpython-gitsid3.2.1-1fixed
Debianpython-gitforky3.2.1-1fixed
Debianpython-gittrixie3.1.44-1vulnerable
Debianpython-gitbookworm3.1.30-1+deb12u2vulnerable
CpegitpythonNot reported3.1.60fixed
PyPIgitpythonNot reported3.1.60fixed
PipgitpythonNot reported3.1.60fixed
Ubuntupython-gitpro3.1.44-1vulnerable
Ubuntupython-gitpro3.1.45-1vulnerable
Ubuntupython-gitpro3.1.46-1vulnerable
Ubuntupython-gitpro3.1.46-1ubuntu0.1~esm1vulnerable
Susepython-GitPythonlinux enterprise module for python 3 15 sp73.1.34.1693646983.2a2ae77-150400.9.11.1fixed
Susepython-GitPythonlinux enterprise high performance computing 15 sp4-espos3.1.34.1693646983.2a2ae77-150400.9.11.1fixed
Susepython-GitPythonlinux enterprise high performance computing 15 sp4-ltss3.1.34.1693646983.2a2ae77-150400.9.11.1fixed
Susepython-GitPythonlinux enterprise high performance computing 15 sp5-espos3.1.34.1693646983.2a2ae77-150400.9.11.1fixed
Susepython-GitPythonlinux enterprise high performance computing 15 sp5-ltss3.1.34.1693646983.2a2ae77-150400.9.11.1fixed
Susepython-GitPythonlinux enterprise server 15 sp4-ltss3.1.34.1693646983.2a2ae77-150400.9.11.1fixed
Susepython-GitPythonlinux enterprise server 15 sp5-ltss3.1.34.1693646983.2a2ae77-150400.9.11.1fixed
Susepython-GitPythonlinux enterprise server 15 sp6-ltss3.1.34.1693646983.2a2ae77-150400.9.11.1fixed
Susepython-GitPythonlinux enterprise server for sap applications 15 sp43.1.34.1693646983.2a2ae77-150400.9.11.1fixed
Susepython-GitPythonlinux enterprise server for sap applications 15 sp53.1.34.1693646983.2a2ae77-150400.9.11.1fixed
Susepython-GitPythonlinux enterprise server for sap applications 15 sp63.1.34.1693646983.2a2ae77-150400.9.11.1fixed

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debianpython-gitsourcesid3.1.61-1not yet assignedNot reportedNot reported
Debianpython-gitsourceforky3.1.61-1not yet assignedNot reportedNot reported
Debianpython-gitsourcetrixie(unfixed)not yet assignedNot reportedNot reported
Debianpython-gitsourcebookworm(unfixed)not yet assignedNot reportedNot reported
CpegitpythoncpeNot reported3.1.60Not reportedNVD-CVE-2026-87817Not reported
PyPIgitpythonPyPINot reported3.1.60Not reportedPYSEC-2026-3982Not reported
PipgitpythonpipNot reported3.1.60Not reportedGHSA-239G-WHFQ-7XJ9Not reported
Susepython-GitPythonrpmlinux enterprise module for python 3 15 sp73.1.34.1693646983.2a2ae77-150400.9.11.1Not reportedSUSE-SU-2026:4191-1Not reported
Susepython-GitPythonrpmlinux enterprise high performance computing 15 sp4-espos3.1.34.1693646983.2a2ae77-150400.9.11.1Not reportedSUSE-SU-2026:4191-1Not reported
Susepython-GitPythonrpmlinux enterprise high performance computing 15 sp4-ltss3.1.34.1693646983.2a2ae77-150400.9.11.1Not reportedSUSE-SU-2026:4191-1Not reported
Susepython-GitPythonrpmlinux enterprise high performance computing 15 sp5-espos3.1.34.1693646983.2a2ae77-150400.9.11.1Not reportedSUSE-SU-2026:4191-1Not reported
Susepython-GitPythonrpmlinux enterprise high performance computing 15 sp5-ltss3.1.34.1693646983.2a2ae77-150400.9.11.1Not reportedSUSE-SU-2026:4191-1Not reported
Susepython-GitPythonrpmlinux enterprise server 15 sp4-ltss3.1.34.1693646983.2a2ae77-150400.9.11.1Not reportedSUSE-SU-2026:4191-1Not reported
Susepython-GitPythonrpmlinux enterprise server 15 sp5-ltss3.1.34.1693646983.2a2ae77-150400.9.11.1Not reportedSUSE-SU-2026:4191-1Not reported
Susepython-GitPythonrpmlinux enterprise server 15 sp6-ltss3.1.34.1693646983.2a2ae77-150400.9.11.1Not reportedSUSE-SU-2026:4191-1Not reported
Susepython-GitPythonrpmlinux enterprise server for sap applications 15 sp43.1.34.1693646983.2a2ae77-150400.9.11.1Not reportedSUSE-SU-2026:4191-1Not reported
Susepython-GitPythonrpmlinux enterprise server for sap applications 15 sp53.1.34.1693646983.2a2ae77-150400.9.11.1Not reportedSUSE-SU-2026:4191-1Not reported
Susepython-GitPythonrpmlinux enterprise server for sap applications 15 sp63.1.34.1693646983.2a2ae77-150400.9.11.1Not reportedSUSE-SU-2026:4191-1Not reported

OpenFactory catalog packages

[Debian 12 (Bookworm)]

  • [python3-git]Affected

    Source package: [python-git]

    Details (2)
    • 3.1.30-1+deb12u2 · all · bookworm

      Affected

      nvd · python-git · debian · bookworm; nvd · python-git · debian · 12

    • 3.1.30-1+deb12u2 · all · bookworm

      Affected

      nvd · python-git · debian · bookworm; nvd · python-git · debian · 12

  • [python-git-doc]Affected

    Source package: [python-git]

    Details (2)
    • 3.1.30-1+deb12u2 · all · bookworm

      Affected

      nvd · python-git · debian · bookworm; nvd · python-git · debian · 12

    • 3.1.30-1+deb12u2 · all · bookworm

      Affected

      nvd · python-git · debian · bookworm; nvd · python-git · debian · 12

[Debian 13 (Trixie)]

  • [python3-git]Affected

    Source package: [python-git]

    Details (2)
    • 3.1.44-1 · all · trixie

      Affected

      nvd · python-git · debian · 13

    • 3.1.44-1 · all · trixie

      Affected

      nvd · python-git · debian · 13

  • [python-git-doc]Affected

    Source package: [python-git]

    Details (2)
    • 3.1.44-1 · all · trixie

      Affected

      nvd · python-git · debian · 13

    • 3.1.44-1 · all · trixie

      Affected

      nvd · python-git · debian · 13

Observed:

References