7.8
CVSSv3

CVE-2023-40590

Published: 28/08/2023 Updated: 05/09/2023
CVSS v3 Base Score: 7.8 | Impact Score: 5.9 | Exploitability Score: 1.8
VMScore: 0

Vulnerability Summary

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 malicious user 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.

Vulnerability Trend

Vulnerable Product Search on Vulmon Subscribe to Product

gitpython project gitpython

Vendor Advisories

DescriptionThe MITRE CVE dictionary describes this issue as: 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 `gitexe` or ...

Github Repositories

Personal use library to "manage" my poetry-based package maintenance tasks.

Manage Introduction In learning how to perform releases to PyPI, I became somewhat "disenchanted" by all the various manual steps and required In the spirit of GTD, a Makefile (or personal favorite Justfile) was a good starting point However, even these left something to be desired which led me to Thomas Feldman's managepy environment I wanted to combine the

API interface to the Raindrop Bookmark Manager.

|docs| Raindrop-IO-py Python wrapper for the API to the Raindropio Bookmark Manager Capabilities include the ability to create, update, delete both link & file-based Raindrops; create, update delete Raindrop collections, tags etc Background I wanted to use an existing API for the Raindrop Bookmark Manager (python-raindropio) to perform some bulk operations through a