Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-87817: Improper Control of Generation of Code ('Code Injection') in gitpython-developers GitPython

0
High
VulnerabilityCVE-2026-87817cvecve-2026-87817
Published: 09/09/2026 (09/09/2026, 11:21:04 UTC)
Source: CVE Database V5
Vendor/Project: gitpython-developers
Product: GitPython

Description

GitPython versions prior to 3.1.60 contain a code injection vulnerability due to improper validation of git directory locations. This flaw allows attackers to impersonate the git directory by manipulating tracked files such as gitdir, commondir, and HEAD. Exploitation involves placing a malicious pre-commit hook in the tracked hooks directory, which executes arbitrary code when a victim calls index.commit() on a cloned or opened repository.

CVSS v4.0

Score 8.7high

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

Affected software

gitpython
pkg:pypi/gitpython
Affected versions
<3.1.60

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/09/2026, 11:52:15 UTC

Technical Analysis

CVE-2026-87817 is a high-severity code injection vulnerability in GitPython before version 3.1.60. The vulnerability arises from insufficient validation of the git directory location, enabling attackers to impersonate the git directory using tracked files like gitdir, commondir, and HEAD. By placing a malicious pre-commit hook in the tracked hooks directory, an attacker can achieve arbitrary code execution when the victim invokes the index.commit() method on a cloned or opened repository. This vulnerability does not require privileges or user interaction beyond calling index.commit().

Potential Impact

Successful exploitation allows an attacker to execute arbitrary code in the context of the user running GitPython by leveraging a malicious pre-commit hook. This can lead to compromise of the victim system or environment where GitPython is used. The vulnerability has a CVSS 4.0 score of 8.7, indicating high severity with network attack vector, low attack complexity, no privileges required, and high impact on confidentiality, integrity, and availability.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, avoid using untrusted repositories or invoking index.commit() on repositories that may contain malicious hooks. Monitor vendor channels for updates and apply patches promptly once released.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
VulnCheck
Date Reserved
2026-09-09T10:32:34.109Z
Cvss Version
4.0
State
PUBLISHED
Remediation Level
null

Threat ID: 6aa1450bacd9273b494035f2

Added to database: 09/09/2026, 11:37:47 UTC

Last enriched: 09/09/2026, 11:52:15 UTC

Last updated: 09/09/2026, 11:55:46 UTC

Views: 4

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses