6.5

CVE-2023-41040: GitPython blind local file inclusion

Modified
AliasesopenSUSE-SU-2023:0259-1openSUSE-SU-2023:0271-1GHSA-cwvm-v4w8-q58c
Published 30-08-2023Last modified 03-11-2025

Vulnerability summary

CVE-2023-41040 is a medium (CVSS 6.5) vulnerability in gitpython_project gitpython. EPSS estimates a 1.09% chance of exploitation in the next 30 days, higher than 65.4% of scored vulnerabilities. 1 public exploit is recorded.

Priority
Routine

Not severe (CVSS 4, local access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
6.5/10
010
Medium · v3.1 (NVD)
EPSS score
1.09%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits1github

Advisory lineage

Upstream 0 · Downstream 7 · Related 2

Timeline

  1. 30-08-2023
    PublishedVulnerability first disclosed.
  2. 03-11-2025
    Last modifiedVulnerability information updated.

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.

CVSS metrics

7 scores · 7 sources · 1 version

EPSS trend

Probability

1.09%

Chance of exploitation in the next 30 days

Percentile

65%

Versus all other CVEs

30-day change

No change 0.00 pp

From 1.09% on 04-10-2026

04-10-202603-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

1 found
  • githubUnverified

    Gitpython

    Maturity: poc

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: local access, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.

Opensuse2 products
  • python-GitPython&distro=openSUSE Leap 15.4< 3.1.12.1610074031.f653af66-bp154.2.3.1
  • python-GitPython&distro=openSUSE Leap 15.5< 3.1.12.1610074031.f653af66-bp155.3.3.1
Redhat2 products
  • GitPython< 0:3.1.14-2.el8ost | < 0:3.1.14-2.el9ost
  • python3-GitPython< 0:3.1.14-2.el8ost | < 0:3.1.14-2.el9ost
Suse2 products
  • python-GitPython&distro=SUSE Package Hub 15 SP4< 3.1.12.1610074031.f653af66-bp154.2.3.1
  • python-GitPython&distro=SUSE Package Hub 15 SP5< 3.1.12.1610074031.f653af66-bp155.3.3.1
Alpine1 product
  • py3-gitpython< 3.1.37-r0
Debian1 product
  • python-git< 2.1.11-1+deb10u2 | < 3.1.30-1+deb12u2 | < 3.1.36-1
Gitpython_project1 product
Gitpython-developers1 product
PyPI1 product
  • gitpython< 3.1.37 | < 3.1.35
Ubuntu1 product
  • python-git< 0.3.2~RC1-3ubuntu0.1~esm3 | < 1.0.1+git137-gc8b8379-2.1ubuntu0.1~esm4 | < 2.1.8-1ubuntu0.1~esm4 | < 3.0.7-1ubuntu0.1~esm4 | < 3.1.24-1ubuntu0.1~esm3

9 vendors · 12 products

References

27 links
Show all 27 references