Description
GitPython is a python library used to interact with Git repositories. Prior to version 3.1.48, a vulnerability in GitPython allows attackers who can supply a crafted reference path to an application using GitPython to write, overwrite, move, or delete files outside the repository’s .git directory via insufficient validation of reference paths in reference creation, rename, and delete operations. This issue has been patched in version 3.1.48.
Published: 2026-05-07
Score: 7.8 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

GitPython treats reference names supplied by an application as direct file paths inside its internal .git directory. The library fails to reject reference names that contain path traversal sequences or relative components, allowing an attacker to construct a reference name that points outside the intended repository directory. Consequently the application can create, overwrite, move, or delete any file that the process can write, enabling malicious code or configuration changes to be injected beyond the bounds of the repository. The impact is a potential compromise of the application’s integrity and, depending on file types written, could enable remote code execution or data tampering.

Affected Systems

The vulnerability affects all versions of GitPython distributed by the gitpython‑developers community that are older than release 3.1.48. Any installation that imports the library to construct, rename, or delete Git references using user‑supplied paths is potentially exposed.

Risk and Exploitability

The CVSS score of 7.8 indicates a high severity vulnerability. While no EPSS value is currently published, the lack of publicly documented exploits and its exclusion from the CISA KEV catalog suggest that exploitation has not yet been observed at scale. Nonetheless, the attack is feasible for any user or remote attacker who can influence the reference name passed to the library, making the risk significant especially for applications exposed to untrusted input. The primary vector is local or remote code injection via crafted reference paths, with exploitation requiring the ability to invoke the vulnerable GitPython APIs.

Generated by OpenCVE AI on May 7, 2026 at 20:37 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade GitPython to version 3.1.48 or later, where the vulnerability has been fixed.
  • Validate or sanitize all user‑supplied reference names before passing them to GitPython reference APIs to ensure they do not contain path traversal sequences.
  • Whenever possible, restrict file write operations to the repository’s own directory or implement a sandbox or whitelist that prevents writing to sensitive system locations.

Generated by OpenCVE AI on May 7, 2026 at 20:37 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-7545-fcxq-7j24 GitPython reference APIs has a path traversal vulnerability that allows arbitrary file write and delete outside the repository
History

Thu, 07 May 2026 21:15:00 +0000

Type Values Removed Values Added
First Time appeared Gitpython Project
Gitpython Project gitpython
CPEs cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:python:*:*
Vendors & Products Gitpython Project
Gitpython Project gitpython
Metrics cvssV3_1

{'score': 7.1, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H'}


Thu, 07 May 2026 20:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Thu, 07 May 2026 19:00:00 +0000

Type Values Removed Values Added
Description GitPython is a python library used to interact with Git repositories. Prior to version 3.1.48, a vulnerability in GitPython allows attackers who can supply a crafted reference path to an application using GitPython to write, overwrite, move, or delete files outside the repository’s .git directory via insufficient validation of reference paths in reference creation, rename, and delete operations. This issue has been patched in version 3.1.48.
Title GitPython: Path traversal in GitPython reference APIs allows arbitrary file write and delete outside the repository
Weaknesses CWE-22
References
Metrics cvssV4_0

{'score': 7.8, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N/E:P'}


Subscriptions

Gitpython Project Gitpython
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-05-07T19:12:49.856Z

Reserved: 2026-05-05T16:33:55.843Z

Link: CVE-2026-44243

cve-icon Vulnrichment

Updated: 2026-05-07T19:09:51.042Z

cve-icon NVD

Status : Analyzed

Published: 2026-05-07T19:16:02.227

Modified: 2026-05-07T21:12:00.777

Link: CVE-2026-44243

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-07T21:24:28Z

Weaknesses