You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
✔️ This issue was automatically closed by Mend because the vulnerable library in the specific branch(es) was either marked as ignored or it is no longer part of the Mend inventory.
mend-bolt-for-githubbot
changed the title
CVE-2023-41040 (Medium) detected in GitPython-3.1.30-py3-none-any.whl
CVE-2023-41040 (Medium) detected in GitPython-3.1.30-py3-none-any.whl - autoclosed
Jan 31, 2025
CVE-2023-41040 - Medium Severity Vulnerability
Vulnerable Library - GitPython-3.1.30-py3-none-any.whl
GitPython is a Python library used to interact with Git repositories
Library home page: https://files.pythonhosted.org/packages/d0/7c/e6942be5f2c03a9de68a6c782373dcec7dc1d10664dd20652bfb7307f905/GitPython-3.1.30-py3-none-any.whl
Path to dependency file: /requirements.txt
Path to vulnerable library: /requirements.txt,/tmp/ws-scm/django-migration-fixer
Dependency Hierarchy:
Found in base branch: main
Vulnerability Details
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.Publish Date: 2023-08-30
URL: CVE-2023-41040
CVSS 3 Score Details (4.0)
Base Score Metrics:
Suggested Fix
Type: Upgrade version
Origin: GHSA-cwvm-v4w8-q58c
Release Date: 2023-08-30
Fix Resolution: GitPython - 3.1.35
Step up your Open Source Security Game with Mend here
The text was updated successfully, but these errors were encountered: