Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2026-87817— GitPython before 3.1.60 Remote Code Execution via Git Directory Impersonation

Quick assessment

Affected
gitpython-developers GitPython
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

在 3.1.60 之前的 GitPython 未能正确验证 git 目录的位置,攻击者可以通过诸如 、 和 等受跟踪文件来冒充 git 目录。攻击者可以通过在受跟踪的 hooks 目录中放置一个恶意的 pre-commit 钩子,当受害者对克隆或打开的仓库调用 时,该钩子将被执行,从而执行任意代码。

CVSS 8.8 · High
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-87817

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
GitPython before 3.1.60 Remote Code Execution via Git Directory Impersonation
Source: CVE Program / CVE List V5
Vulnerability 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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
对生成代码的控制不恰当(代码注入)
Source: CVE Program / CVE List V5

Affected Products

Vendor Product Affected Versions CPE Subscribe
gitpython-developers GitPython 0 ~ 3.1.60 -

II. Public POCs for CVE-2026-87817

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-87817

登录查看更多情报信息。

Vendor Advisories for CVE-2026-87817 (2)

Same Patch Batch · gitpython-developers · 2026-09-09 · 3 CVEs total

CVE-2026-87819 7.5 HIGH GitPython before 3.1.60 Denial of Service via ReDoS
CVE-2026-87818 6.5 MEDIUM GitPython 3.1.59 Local File Content Oracle via --no-index

IV. Related Vulnerabilities

V. Comments for CVE-2026-87817

No comments yet


Leave a comment