{"api_version":"1","generated_at":"2026-04-22T21:27:08+00:00","cve":"CVE-2023-41040","urls":{"html":"https://cve.report/CVE-2023-41040","api":"https://cve.report/api/cve/CVE-2023-41040.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2023-41040","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2023-41040"},"summary":{"title":"CVE-2023-41040","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 not yet been addressed.","state":"PUBLIC","assigner":"security-advisories@github.com","published_at":"2023-08-30 22:15:00","updated_at":"2023-09-29 20:15:00"},"problem_types":["CWE-22"],"metrics":[],"references":[{"url":"https://github.com/gitpython-developers/GitPython/blob/1c8310d7cae144f74a671cbe17e51f63a830adbf/git/refs/symbolic.py#L174-L175","name":"https://github.com/gitpython-developers/GitPython/blob/1c8310d7cae144f74a671cbe17e51f63a830adbf/git/refs/symbolic.py#L174-L175","refsource":"MISC","tags":[],"title":"","mime":"text/plain","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.debian.org/debian-lts-announce/2023/09/msg00036.html","name":"https://lists.debian.org/debian-lts-announce/2023/09/msg00036.html","refsource":"MISC","tags":[],"title":"[SECURITY] [DLA 3589-1] python-git security update","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-cwvm-v4w8-q58c","name":"https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-cwvm-v4w8-q58c","refsource":"MISC","tags":[],"title":"Blind local file inclusion · Advisory · gitpython-developers/GitPython · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.cve.org/CVERecord?id=CVE-2023-41040","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-41040","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2023","cve_id":"41040","vulnerable":"1","versionEndIncluding":"3.1.34","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"gitpython_project","cpe5":"gitpython","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"python","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[{"cve":"CVE-2023-41040","qid":"242625","title":"Red Hat Update for Satellite 6.14.1 (RHSA-2023:7851)"},{"cve":"CVE-2023-41040","qid":"242871","title":"Red Hat Update for OpenStack Platform 17.1 (RHSA-2024:0215)"},{"cve":"CVE-2023-41040","qid":"242876","title":"Red Hat Update for OpenStack Platform 17.1 (RHSA-2024:0190)"},{"cve":"CVE-2023-41040","qid":"506176","title":"Alpine Linux Security Update for py3-gitpython"},{"cve":"CVE-2023-41040","qid":"6000049","title":"Debian Security Update for python-git (DLA 3589-1)"}]},"source_records":{"cve_program":{"data_version":"4.0","data_type":"CVE","data_format":"MITRE","CVE_data_meta":{"ID":"CVE-2023-41040","ASSIGNER":"security-advisories@github.com","STATE":"PUBLIC"},"description":{"description_data":[{"lang":"eng","value":" 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."}]},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')","cweId":"CWE-22"}]}]},"affects":{"vendor":{"vendor_data":[{"vendor_name":"gitpython-developers","product":{"product_data":[{"product_name":"GitPython","version":{"version_data":[{"version_affected":"=","version_value":"<= 3.1.34"}]}}]}}]}},"references":{"reference_data":[{"url":"https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-cwvm-v4w8-q58c","refsource":"MISC","name":"https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-cwvm-v4w8-q58c"},{"url":"https://github.com/gitpython-developers/GitPython/blob/1c8310d7cae144f74a671cbe17e51f63a830adbf/git/refs/symbolic.py#L174-L175","refsource":"MISC","name":"https://github.com/gitpython-developers/GitPython/blob/1c8310d7cae144f74a671cbe17e51f63a830adbf/git/refs/symbolic.py#L174-L175"},{"url":"https://lists.debian.org/debian-lts-announce/2023/09/msg00036.html","refsource":"MISC","name":"https://lists.debian.org/debian-lts-announce/2023/09/msg00036.html"}]},"source":{"advisory":"GHSA-cwvm-v4w8-q58c","discovery":"UNKNOWN"},"impact":{"cvss":[{"attackComplexity":"LOW","attackVector":"LOCAL","availabilityImpact":"LOW","baseScore":4,"baseSeverity":"MEDIUM","confidentialityImpact":"NONE","integrityImpact":"NONE","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","version":"3.1"}]}},"nvd":{"publishedDate":"2023-08-30 22:15:00","lastModifiedDate":"2023-09-29 20:15:00","problem_types":["CWE-22"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"LOW","integrityImpact":"NONE","availabilityImpact":"LOW","baseScore":6.5,"baseSeverity":"MEDIUM"},"exploitabilityScore":3.9,"impactScore":2.5}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:python:*:*","versionEndIncluding":"3.1.34","cpe_name":[]}]}]}},"legacy_mitre":{"record":null,"notes":[]}}}