CVE-2023-41040
GitPython Denial of Service File Path Manipulation Vulnerability
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.
INFO
Published Date :
Aug. 30, 2023, 10:15 p.m.
Last Modified :
Sept. 20, 2024, 9:15 p.m.
Source :
[email protected]
Remotely Exploitable :
Yes !
Impact Score :
2.5
Exploitability Score :
3.9
Public PoC/Exploit Available at Github
CVE-2023-41040 has a 1 public PoC/Exploit
available at Github.
Go to the Public Exploits
tab to see the list.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2023-41040
.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
API interface to the Raindrop Bookmark Manager.
Python Just
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2023-41040
vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2023-41040
vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Modified by [email protected]
Sep. 20, 2024
Action Type Old Value New Value Changed 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 not yet been addressed. 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. Added Reference GitHub, Inc. https://github.com/gitpython-developers/GitPython/pull/1672 [No types assigned] Added Reference GitHub, Inc. https://github.com/gitpython-developers/GitPython/commit/74e55ee4544867e1bd976b7df5a45869ee397b0b [No types assigned] Added Reference GitHub, Inc. https://github.com/gitpython-developers/GitPython/commit/e98f57b81f792f0f5e18d33ee658ae395f9aa3c4 [No types assigned] Added Reference GitHub, Inc. https://github.com/gitpython-developers/GitPython/releases/tag/3.1.37 [No types assigned] Added Reference GitHub, Inc. https://github.com/pypa/advisory-database/tree/main/vulns/gitpython/PYSEC-2023-165.yaml [No types assigned] -
CVE Modified by [email protected]
May. 14, 2024
Action Type Old Value New Value -
CVE Modified by [email protected]
Sep. 29, 2023
Action Type Old Value New Value Added Reference https://lists.debian.org/debian-lts-announce/2023/09/msg00036.html [No Types Assigned] -
CVE Modified by [email protected]
Sep. 06, 2023
Action Type Old Value New Value Removed CVSS V3.1 GitHub, Inc. AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L Added CVSS V3.1 GitHub, Inc. AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L Removed CVSS V3.1 Reason C-No limiting factors -
Initial Analysis by [email protected]
Sep. 05, 2023
Action Type Old Value New Value Added CVSS V3.1 NIST AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L Changed Reference Type https://github.com/gitpython-developers/GitPython/blob/1c8310d7cae144f74a671cbe17e51f63a830adbf/git/refs/symbolic.py#L174-L175 No Types Assigned https://github.com/gitpython-developers/GitPython/blob/1c8310d7cae144f74a671cbe17e51f63a830adbf/git/refs/symbolic.py#L174-L175 Product Changed Reference Type https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-cwvm-v4w8-q58c No Types Assigned https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-cwvm-v4w8-q58c Exploit, Vendor Advisory Added CWE NIST CWE-22 Added CPE Configuration OR *cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:python:*:* versions up to (including) 3.1.34
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2023-41040
is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2023-41040
weaknesses.
Exploit Prediction
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.
0.33 }} 0.06%
score
0.71203
percentile