Read the docs
TI-2023-21666 Aliases CVE-2023-41040GHSA-cwvm-v4w8-q58c

GitPython blind local file inclusion

Priority MEDIUM 62CWE-22Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
—
Confidentiality · integrity · availability
Low · None · Low
Fix status
Partial Red Hat: 4 fixed, 5 without a fix

Attack profile from CVSS 3.1 · NVD. Fix status from CNA, GitHub and Red Hat.

Summary

GitPython is a python library used to interact with Git repositories. In order to resolve some git references, GitPython reads files from the `.git` directory, in some places the name of the file being read is provided by the user, GitPython doesn't check if this file is located outside the `.git` directory. This allows an attacker to make GitPython read any file from the system. This vulnerability is present in https://github.com/gitpython-developers/GitPython/blob/1c8310d7cae144f74a671cbe17e51f63a830adbf/git/refs/symbolic.py#L174-L175. That code joins the base directory with a user given string without checking if the final path is located outside the base directory. This vulnerability cannot be used to read the contents of files but could in theory be used to trigger a denial of service for the program. This issue has been addressed in version 3.1.37.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.01093 65th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Partial GitPython (gitpython-developers): 3.1.37GitPython (PyPI): 3.1.37Red Hat: 5 advisoriesRed Hat: 4 fixed, 5 without a fix

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Partial

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-developersGitPythonbefore 3.1.373.1.37Patch availableCNA
—GitPython (PyPI)before 3.1.373.1.37Patch availableGHSA-cwvm-v4w8-q58c
  • GitPython Vendorgitpython-developers Affected before 3.1.37 Fixed in 3.1.37 Patch available CNA
  • GitPython (PyPI) Vendor— Affected before 3.1.37 Fixed in 3.1.37 Patch available GHSA-cwvm-v4w8-q58c

CPE configurations NVD · 1

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

Remediation

  • Fix · CNA GitPython (gitpython-developers) Fixed in 3.1.37
  • Fix · GHSA-cwvm-v4w8-q58c GitPython (PyPI) Fixed in 3.1.37 Advisory →

Red Hat 5 advisories

  • RHSA-2024:1640 Released 2024-04-02 · Red Hat rating Moderate
    Red Hat Ansible Automation Platform 2.4 Product Security and Bug Fix Update
    • Red Hat Ansible Automation Platform 2.4 for RHEL 8 automation-controller-venv-tower-4.5.5-2.el8ap, python39-aiohttp-3.9.3-1.el8ap, python39-django-4.2.11-1.el8ap +4
    • Red Hat Ansible Automation Platform 2.4 for RHEL 9 automation-controller-venv-tower-4.5.5-2.el9ap, python-aiohttp-3.9.3-1.el9ap, python-django-4.2.11-1.el9ap +4
  • RHSA-2024:0322 Released 2024-01-22 · Red Hat rating Moderate
    Red Hat Ansible Automation Platform 2.4 Product Security and Bug Fix Update
    • Red Hat Ansible Automation Platform 2.4 for RHEL 8 python39-gitpython-3.1.40-1.el8ap, python39-twisted+tls-23.10.0-1.el8ap, python39-twisted-23.10.0-1.el8ap +2
    • Red Hat Ansible Automation Platform 2.4 for RHEL 9 python-gitpython-3.1.40-1.el9ap, python-twisted-23.10.0-1.el9ap, python3-gitpython-3.1.40-1.el9ap +2
  • RHSA-2024:0190 Released 2024-01-16 · Red Hat rating Moderate
    Red Hat OpenStack Platform 17.1 (GitPython) security update
    • Red Hat OpenStack Platform 17.1 GitPython-3.1.14-2.el8ost, python3-GitPython-3.1.14-2.el8ost
Show 2 more Red Hat advisories
  • RHSA-2024:0215 Released 2024-01-16 · Red Hat rating Moderate
    Red Hat OpenStack Platform 17.1 (GitPython) security update
    • Red Hat OpenStack Platform 17.1 GitPython-3.1.14-2.el9ost, python3-GitPython-3.1.14-2.el9ost
  • RHSA-2023:7851 Released 2023-12-14 · Red Hat rating Moderate
    Satellite 6.14.1 Async Security Update
    • Red Hat Satellite 6.14 for RHEL 8 createrepo_c-1.0.2-2.el8pc, createrepo_c-libs-1.0.2-2.el8pc, foreman-3.7.0.10-1.el8sat +47

Vendor assessments

Red Hat

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

ProductStatusPlan or fix
Red Hat Certification Program for Red Hat Enterprise Linux 9AffectedNo fix planned: Will not fix
Red Hat Certification for Red Hat Enterprise Linux 7AffectedNo fix planned: Out of support scope
Red Hat Certification for Red Hat Enterprise Linux 8AffectedNo fix planned: Will not fix
Red Hat OpenStack Platform 16.1AffectedNo fix planned: Will not fix
Red Hat OpenStack Platform 16.2AffectedNo fix planned: Will not fix
Red Hat Ansible Automation Platform 2.4 for RHEL 8Fixed RHSA-2024:0322, RHSA-2024:1640
Red Hat Ansible Automation Platform 2.4 for RHEL 9Fixed RHSA-2024:0322, RHSA-2024:1640
Red Hat OpenStack Platform 17.1Fixed RHSA-2024:0190, RHSA-2024:0215
Red Hat Satellite 6.14 for RHEL 8Fixed RHSA-2023:7851
Not affected: 3 products
  • Red Hat Ansible Automation Platform 2.4 for RHEL 8
  • Red Hat Ansible Automation Platform 2.4 for RHEL 9
  • Red Hat Satellite 6.14 for RHEL 8

Timeline

  1. 2026-10-02 Threatist record created from CVE-2023-41040
  2. 2026-10-03 Alias added: GHSA-cwvm-v4w8-q58c

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