CVE-2023-41040

python3-git: GitPython is a python library used to interact with Git repositories

CVE-2023-41040 is fixed in 2 products on 1 platform, first by DEBIAN-CVE-2023-41040, released August 30, 2023. It is not reported as exploited. Patch Radar priority: Routine.

Routine
CVSS
6.5
Medium
Exploitation
None reported
No vendor assessment
CISA KEV
Not listed
Not in the Known Exploited Vulnerabilities catalog
EPSS
0.0109
65th percentile

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.

Where it's fixed

ProductFixed inFixReleased
Linux
python-git · Debian 12.15 (bookworm) 3.1.30-1+deb12u2 DEBIAN-CVE-2023-41040 Aug 30, 2023
python-git · Debian 13.5 (trixie) 3.1.36-1 DEBIAN-CVE-2023-41040 Aug 30, 2023
python-git · Debian 14 3.1.36-1 DEBIAN-CVE-2023-41040 Aug 30, 2023
python-git · Ubuntu 18.04.6 LTS (bionic) 2.1.8-1ubuntu0.1~esm4 python-git 2.1.8-1ubuntu0.1~esm4 May 27, 2026
python3-git · Ubuntu 18.04.6 LTS (bionic) 2.1.8-1ubuntu0.1~esm4 python3-git 2.1.8-1ubuntu0.1~esm4 May 27, 2026
python3-git · Ubuntu 20.04 LTS (focal) 3.0.7-1ubuntu0.1~esm4 python3-git 3.0.7-1ubuntu0.1~esm4 May 27, 2026
python3-git · Ubuntu 22.04.1 LTS (jammy) 3.1.24-1ubuntu0.1~esm3 python3-git 3.1.24-1ubuntu0.1~esm3 May 27, 2026

Patch Radar data is free to use with attribution. Terms and how to credit it.

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.