Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CVE-2023-41040 (Medium) detected in GitPython-3.1.29-py3-none-any.whl #3365

Open
mend-bolt-for-github bot opened this issue Dec 26, 2023 · 1 comment
Assignees
Labels
Mend: dependency security vulnerability Security vulnerability detected by Mend needs/triage

Comments

@mend-bolt-for-github
Copy link

mend-bolt-for-github bot commented Dec 26, 2023

CVE-2023-41040 - Medium Severity Vulnerability

Vulnerable Library - GitPython-3.1.29-py3-none-any.whl

GitPython is a Python library used to interact with Git repositories

Library home page: https://files.pythonhosted.org/packages/1f/d3/020efb312a7d25fa00e144497a33378d415552e5581be080a99017af6d39/GitPython-3.1.29-py3-none-any.whl

Path to dependency file: /docs/requirements.txt

Path to vulnerable library: /docs/requirements.txt,/docs/requirements.txt,/tmp/ws-scm/java-patterns

Dependency Hierarchy:

  • GitPython-3.1.29-py3-none-any.whl (Vulnerable Library)

Found in base branch: master

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 not yet been addressed.

Publish Date: 2023-08-30

URL: CVE-2023-41040

CVSS 3 Score Details (6.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: Low
    • Integrity Impact: None
    • Availability Impact: Low

For more information on CVSS3 Scores, click here.

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

@mend-bolt-for-github mend-bolt-for-github bot added the Mend: dependency security vulnerability Security vulnerability detected by Mend label Dec 26, 2023
Copy link
Contributor

👋 Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mend: dependency security vulnerability Security vulnerability detected by Mend needs/triage
Projects
None yet
Development

No branches or pull requests

1 participant