Skip to main content
CVE-2026-87817VulnerabilityPublished Updated

Python git: GitPython before 3.1.60 fails to properly validate the git directory location, allowing attackers to

Affects python-gitSource GCVE Database

0
Compare
Authoritative record:CVE-2026-87817· High 8.7

Not known to be exploited · CVSS 8.7 High.

Data as of 24 Nov 2026, 21:25 UTC

CVSS 4.0 base score
8.7High
How severe the flaw is on the 0–10 CVSS scale.
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

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 9 Sep 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 24 Nov 2026.

What to do

Affected software

ProductAffectedFixed in
Ubuntu Pro 26.04 LTSpython-gitpkg:deb/ubuntu/python-git?arch=source&distro=esm-apps/resoluteOther threatsAffected
  • 3.1.44-1 – 3.1.46-1ubuntu0.1~esm1
4 affected builds
Fixed in–
Ubuntu Pro 24.04 LTSpython-gitpkg:deb/ubuntu/python-git?arch=source&distro=esm-apps/nobleOther threatsAffected
  • 3.1.30-1 – 3.1.37-3ubuntu0.1~esm2
4 affected builds
Fixed in–
Ubuntu Pro 22.04 LTSpython-gitpkg:deb/ubuntu/python-git?arch=source&distro=esm-apps/jammyOther threatsAffected
  • 3.1.14-1 – 3.1.24-1ubuntu0.1~esm3
6 affected builds
Fixed in–
Ubuntu Pro 20.04 LTSpython-gitpkg:deb/ubuntu/python-git?arch=source&distro=esm-apps/focalOther threatsAffected
  • 2.1.11-1 – 3.0.7-1ubuntu0.1~esm4
7 affected builds
Fixed in–
Ubuntu Pro 18.04 LTSpython-gitpkg:deb/ubuntu/python-git?arch=source&distro=esm-apps/bionicOther threatsAffected
  • 2.1.5-1 – 2.1.8-1ubuntu0.1~esm4
7 affected builds
Fixed in–
Ubuntu Pro 16.04 LTSpython-gitpkg:deb/ubuntu/python-git?arch=source&distro=esm-apps-legacy/xenialOther threatsAffected
  • 1.0.1+git137-gc8b8379-1 – 1.0.1+git137-gc8b8379-2.1ubuntu0.1~esm4
6 affected builds
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

Description

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.

References

Community reviews

Loading reviews…