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

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2023-40590— Untrusted search path on Windows systems leading to arbitrary code execution

Quick assessment

Affected
gitpython-developers GitPython
Exploitation
Public or AI PoC available; prioritize validation
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

GitPython是gitpython-developers开源的一个用于与 Git 存储库交互的 Python 库。 GitPython 3.1.32及之前版本存在代码问题漏洞,该漏洞源于攻击者可以诱骗用户下载带有恶意git可执行文件的存储库,攻击者可以运行任何任意命令。

CVSS 7.8 · High EPSS 0.51% · P41

Possible ATT&CK Techniques 1 AI

T1059 · Command and Scripting Interpreter
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2023-40590

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
Untrusted search path on Windows systems leading to arbitrary code execution
Source: CVE Program / CVE List V5
Vulnerability Description
GitPython is a python library used to interact with Git repositories. When resolving a program, Python/Windows look for the current working directory, and after that the PATH environment. GitPython defaults to use the `git` command, if a user runs GitPython from a repo has a `git.exe` or `git` executable, that program will be run instead of the one in the user's `PATH`. This is more of a problem on how Python interacts with Windows systems, Linux and any other OS aren't affected by this. But probably people using GitPython usually run it from the CWD of a repo. An attacker can trick a user to download a repository with a malicious `git` executable, if the user runs/imports GitPython from that directory, it allows the attacker to run any arbitrary commands. There is no fix currently available for windows users, however there are a few mitigations. 1: Default to an absolute path for the git program on Windows, like `C:\\Program Files\\Git\\cmd\\git.EXE` (default git path installation). 2: Require users to set the `GIT_PYTHON_GIT_EXECUTABLE` environment variable on Windows systems. 3: Make this problem prominent in the documentation and advise users to never run GitPython from an untrusted repo, or set the `GIT_PYTHON_GIT_EXECUTABLE` env var to an absolute path. 4: Resolve the executable manually by only looking into the `PATH` environment variable.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:L/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
Vulnerability Title
GitPython 代码问题漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
GitPython是gitpython-developers开源的一个用于与 Git 存储库交互的 Python 库。 GitPython 3.1.32及之前版本存在代码问题漏洞,该漏洞源于攻击者可以诱骗用户下载带有恶意git可执行文件的存储库,攻击者可以运行任何任意命令。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
gitpython-developers GitPython <= 3.1.32 -

II. Public POCs for CVE-2023-40590

# POC Description Source Link Shenlong Link
AI-Generated POC Premium
Qwen3.6-35B-A3B · 8440 chars
Pro+ exclusive includes:
Vulnerability reproduction recording (real sandbox build + trigger, exclusive)
In-depth vulnerability mechanism
Trigger conditions & impact
Full executable POC code
Exploit chain & mitigation
POC zip download
100+ AI POC generations per month

III. Intelligence Information for CVE-2023-40590

请登录查看更多情报信息。

Vendor Advisories for CVE-2023-40590 (1)

Other References for CVE-2023-40590 (1)

IV. Related Vulnerabilities

V. Comments for CVE-2023-40590

No comments yet


Leave a comment