Read the docs
TI-2023-21388 Aliases CVE-2023-40590GHSA-wfm5-v35h-vwf4

Untrusted search path on Windows systems leading to arbitrary code execution

Priority HIGH 69CWE-426Published · Updated

Key facts

Attack vector
Local
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-426.

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

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00509 43rd percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed GitPython (PyPI): 3.1.33

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
gitpython-developersGitPythonup to 3.1.32—No fix listedCNA
—GitPython (PyPI)before 3.1.333.1.33Patch availableGHSA-wfm5-v35h-vwf4
  • GitPython Vendorgitpython-developers Affected up to 3.1.32 Fixed in — No fix listed CNA
  • GitPython (PyPI) Vendor— Affected before 3.1.33 Fixed in 3.1.33 Patch available GHSA-wfm5-v35h-vwf4

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:python:*:*up to 3.1.32Vulnerablegitpython-developers
  • cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:python:*:* Versions up to 3.1.32 Vulnerable ·gitpython-developers

Remediation

  • Fix · GHSA-wfm5-v35h-vwf4 GitPython (PyPI) Fixed in 3.1.33 Advisory →

Vendor assessments

Red Hat

Red Hat rating: Important. Red Hat's page for this CVE →

Not affected: 9 products
  • Red Hat Ansible Automation Platform 2
  • Red Hat Certification Program for Red Hat Enterprise Linux 9
  • Red Hat Certification for Red Hat Enterprise Linux 7
  • Red Hat Certification for Red Hat Enterprise Linux 8
  • Red Hat OpenStack Platform 16.1
  • Red Hat OpenStack Platform 16.2
  • Red Hat OpenStack Platform 17.0
  • Red Hat OpenStack Platform 17.1
  • Red Hat Satellite 6

Timeline

  1. 2026-10-02 Threatist record created from CVE-2023-40590
  2. 2026-10-03 Alias added: GHSA-wfm5-v35h-vwf4

References

  • TI-2026-54689 GitPython before 3.1.59 Path Traversal via separate-git-dir CVSS 4.0HIGH 8.7
  • TI-2026-51706 GitPython before 3.1.55 Environment Variable Exfiltration via Remote.add() CVSS 4.0HIGH 8.7
  • TI-2026-47618 GitPython before 3.1.52 Environment Variable Exfiltration via clone_from CVSS 4.0HIGH 8.7
  • TI-2026-30595 GitPython: Unsafe option check validates multi_options before shlex.split transforms it CVSS 3.1CRITICAL 9.8
  • TI-2026-32220 GitPython: Path traversal in GitPython reference APIs allows arbitrary file write and delete outside the repository CVSS 4.0HIGH 7.8
  • TI-2026-47621 GitPython before 3.1.51 Command Injection via option prefix abbreviation CVSS 4.0HIGH 8.7
See all 34 →

Sources