CVE-2023-41040
CVSS v3
6.5
MEDIUM
EPSS Score
1.1 %
exploit probability, as of 2026-10-17
CISA KEV
No
known exploited
Exploitation
—
SSVC status
Get an alert for each new CVE published for gitpython. Watch gitpython in CVE Watch Free account · no credit card
Affected and fixed versions
Packages from OSV.dev and products from the vendors' CSAF advisories.
version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.
Packages
- gitpythonPyPIall versions · fixed in 3.1.35
Vendor advisories
GitPython: Blind local file inclusion
redhat-certification.src as a component of Red Hat Certification for Red Hat Enterprise Linux 7 · redhat-certification.src as a component of Red Hat Certification for Red Hat Enterprise Linux 8 · redhat-certification.src as a component of Red Hat Certification Program for Red Hat Enterprise Linux 9
Red Hat Security Advisory: Red Hat Ansible Automation Platform 2.4 Product Security and Bug Fix Update
Red Hat Security Advisory: Red Hat Ansible Automation Platform 2.4 Product Security and Bug Fix Update
Red Hat Security Advisory: Red Hat OpenStack Platform 17.1 (GitPython) security update
Red Hat Security Advisory: Red Hat OpenStack Platform 17.1 (GitPython) security update
Red Hat Security Advisory: Satellite 6.14.1 Async Security Update
Description
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.
Technical details
- Published
- 2023-08-30
Frequently asked questions
What is CVE-2023-41040?
Is CVE-2023-41040 actively exploited?
What is the CVSS score for CVE-2023-41040?
Running gitpython? Hear about its next vulnerability
CVE Watch matches each new CVE to the vendors and products you list (vendor and product, not the version) and puts it in your alerts with its KEV and EPSS status.
Already have an account? Open CVE WatchNo credit card required · 50 free checks/month · Free API key
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? CVE Watch alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.
- CVE-2022-24439same product
- CVE-2026-67325same product
- CVE-2026-67323same product
- CVE-2026-73625same product
- CVE-2026-76220same productGitPython before 3.1.58 Command Execution via split_single_char_options
- CVE-2026-73623same product
- CVE-2026-76218same productGitPython before 3.1.58 Remote Code Execution via Repo.init
- CVE-2026-78676same productGitPython before 3.1.59 Remote Code Execution via Config Injection