CVE-2026-87817
GitPython before 3.1.60 Remote Code Execution via Git Directory Impersonation
No known exploitation. EPSS puts it in the 32nd percentile. Only a workaround so far.
What to do
No fixed build is published yet. The vendor describes a workaround.
Steps
Written by AI from the record- Check whether your applications use gitpython and whether they open repositories supplied by users, customers, or external services.
- Upgrade gitpython to version 3.1.60.
- Until upgraded, prevent applications from committing changes to untrusted repositories and isolate any such repositories from production systems.
- Review recent automated commits from externally supplied repositories for unexpected commands or changes.
pip install --upgrade gitpython==3.1.60What it is
From the CVE record
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.
In plain language
Written by AI from the recordgitpython versions before 3.1.60 can let a malicious code repository run code on your system when your software saves changes to that repository, so businesses using it should update.
CWE-94 code execution in GitPython occurs when attacker-controlled git-directory metadata redirects hooks that run during index.commit() on a cloned or opened repository.
If you're affected
- Application server takeover
- Repository tampering
- Customer data exposure
- Business service disruption
Exploitation
Where each signal puts this CVE on the scale from published to confirmed exploited.
- CISA KEV
Not in the catalog. CISA has not confirmed exploitation.
- Public exploits
No public exploit or proof of concept found in the sources we track.
- EPSS
0.4% chance of exploitation activity in the next 30 days, which ranks it in the 32nd percentile of scored CVEs.
Exploit Prediction Scoring System, FIRST.org. A probability, not a confirmation.
Lifecycle
9 events over 9 days, from the signal feeds we watch.
- OpenVAS check added
- Workaround availablerecord updated
- Record updated
- Publishedweakness classified, att&ck mapped, record updated, record updated
Affected products
Technical detail
CVSS 3.1 vector
Open in the CVSS calculatorCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Scored 8.8 by NVD.
How it is reached
- Attack Vector NetworkExploitable remotely over the network without any special conditions
- Attack Complexity LowNo special conditions — the attack can be reliably reproduced
- Privileges Required NoneNo authentication required — anyone can exploit this
- User Interaction RequiredA user must click a link, open a file, or perform some action
Scope
- Scope UnchangedImpact is limited to the vulnerable component itself
Impact if exploited
- Confidentiality HighTotal information disclosure — all data in the component is compromised
- Integrity HighTotal loss of integrity — attacker can modify any data in the component
- Availability HighTotal denial of service — the component is completely unavailable
Weaknesses
ATT&CK techniques
Mapped from the weaknesses above (CWE to ATT&CK), not observed in attacks.
Sources
Watch the software you run.
My Stack ranks new CVEs for your products by real-world exploitation, so the next serious one reaches you without reading every advisory.
We'll flag the next CVE, public exploit or patch for Gitpython, not every advisory.
A free account adds
- The full version matrix and every affected product
- Exploit links, proofs of concept and Metasploit modules
- Email alerts for the products you watch
- The same data over REST API, MCP and CLI