Skip to main content
VulnerabilityPublished Updated

CVE-2026-87817: GitPython · Repository content can impersonate the git directory, leading to arbitrary code execution

Affects standardebooksSource GCVE Database

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

Not known to be exploited · CVSS 8.7 High : upgrade to 4.1.1 soon.

Data as of 22 Nov 2026, 18:11 UTC

CVSS 4.0 base score
8.7High
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 4.1.1
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 21 Nov 2026.

What to do

Upgrade standardebooks to 4.1.1.

Affected software

ProductAffectedFixed in
Homebrewstandardebookspkg:brew/standardebooksOther threatsAffected
  • >=2.9.2 <4.1.1
Fixed in
  • 4.1.1

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

AI-suggested

A fix is available in GitPython version 4.1.1. Users should upgrade to this version or later to resolve the vulnerability. The fix involves reordering the git directory discovery to prioritize the real .git directory, validating HEAD contents, resolving hook paths correctly, and disabling merge_includes when reading config. Until upgrading, users should avoid opening or cloning untrusted repositories with GitPython and avoid calling index.commit() on such repositories.

Description

GitPython versions from 2.9.2 up to but not including 4.1.1 contain a vulnerability where the library misidentifies the git directory by prioritizing tracked files over the actual .git directory. This allows attacker-controlled repository content to impersonate the git directory, leading to arbitrary code execution via malicious hooks when a victim performs a commit using GitPython. Additionally, attackers can read sensitive files outside the repository and write config files to arbitrary locations. The issue is fixed in version 4.1.1.

References

Community reviews

Loading reviews…