Bugzilla – Bug 1214810
VUL-0: CVE-2023-41040: python-GitPython: Blind local file inclusion
Last modified: 2023-10-27 06:41:49 UTC
CVE-2023-41040 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. References: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2023-41040 https://www.cve.org/CVERecord?id=CVE-2023-41040 https://github.com/gitpython-developers/GitPython/blob/1c8310d7cae144f74a671cbe17e51f63a830adbf/git/refs/symbolic.py#L174-L175 https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-cwvm-v4w8-q58c
Affected: - SUSE:ALP:Source:Standard:1.0/python-GitPython 3.1.32 - SUSE:SLE-12-SP3:Update:Products:Cloud8:Update/python-GitPython 2.1.8 - SUSE:SLE-12-SP4:Update:Products:Cloud9:Update/python-GitPython 2.1.11 - openSUSE:Backports:SLE-15-SP4/python-GitPython 3.1.12 - openSUSE:Factory/python-GitPython 3.1.32
since cvss < 7, wontfix for cloud8 and cloud9
There's no upstream solution yet. I'm following the bug in github to track the issue https://github.com/gitpython-developers/GitPython/issues/1638
Upstream patch in progress: https://github.com/gitpython-developers/GitPython/pull/1644
This is an autogenerated message for OBS integration: This bug (1214810) was mentioned in https://build.opensuse.org/request/show/1109413 Factory / python-GitPython
This is an autogenerated message for OBS integration: This bug (1214810) was mentioned in https://build.opensuse.org/request/show/1109428 Backports:SLE-15-SP4 / python-GitPython https://build.opensuse.org/request/show/1109431 Backports:SLE-15-SP5 / python-GitPython
openSUSE-SU-2023:0259-1: An update that fixes one vulnerability is now available. Category: security (moderate) Bug References: 1214810 CVE References: CVE-2023-41040 JIRA References: Sources used: openSUSE Backports SLE-15-SP5 (src): python-GitPython-3.1.12.1610074031.f653af66-bp155.3.3.1
openSUSE-SU-2023:0271-1: An update that fixes one vulnerability is now available. Category: security (moderate) Bug References: 1214810 CVE References: CVE-2023-41040 JIRA References: Sources used: openSUSE Backports SLE-15-SP4 (src): python-GitPython-3.1.12.1610074031.f653af66-bp154.2.3.1