CVE-2023-41040 — GitPython is a python library used to interact with Git repositories
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 loc
Published
2023-08-30T21:07:42.263Z
Last modified
2025-11-03T21:49:29.315Z
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
01What is this vulnerability?
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…
02Affected products
| Vendor | Product | Versions |
|---|
| gitpython-developers | GitPython | < 3.1.37 |
03Active exploitation status
Not currently listed on the CISA Known Exploited Vulnerabilities (KEV) catalog. EPSS is the best forward-looking signal — see the EPSS row above.
04Recommended remediation
- Patch to a fixed version listed in the vendor advisory (see references below).
- Mitigate with WAF rules, network egress filters, or feature flags where the patch is not yet available.
- Hunt historical logs for exploitation indicators — see Detection signatures below.
05Technical details
For the full vendor write-up, exploit chains, and reference implementations, see the references list in section 09.
06Detection signatures
Open the Sigma generator with a pre-filled prompt for this CVE to draft a starting detection in your stack of choice:
Open in Sigma generator →
07Related CVEs
No directly-cited follow-up CVEs in the KB record for this advisory. The references list in section 09 carries the vendor cross-references.
08Timeline
- Published: 2023-08-30T21:07:42.263Z
- Last modified: 2025-11-03T21:49:29.315Z
09References
- github.com — https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-cwvm-…
- github.com — https://github.com/gitpython-developers/GitPython/pull/1672
- github.com — https://github.com/gitpython-developers/GitPython/commit/74e55ee4544867e1bd976b7…
- github.com — https://github.com/gitpython-developers/GitPython/commit/e98f57b81f792f0f5e18d33…
- github.com — https://github.com/gitpython-developers/GitPython/blob/1c8310d7cae144f74a671cbe1…
- github.com — https://github.com/gitpython-developers/GitPython/releases/tag/3.1.37
- github.com — https://github.com/pypa/advisory-database/tree/main/vulns/gitpython/PYSEC-2023-1…
- lists.debian.org — https://lists.debian.org/debian-lts-announce/2023/09/msg00036.html
Want this in your SOAR or SIEM?
SARA's API returns EPSS, CVSS, KEV, and an analyst-grade summary in one call.
Read the API reference →