Description
GitPython before 3.1.58 fails to validate submodule names from .gitmodules files, allowing attackers to create Git repositories at arbitrary filesystem paths outside the intended clone directory. Attackers can craft malicious repositories with traversal sequences in submodule names that GitPython processes during submodule initialization, creating attacker-controlled Git repositories at escaped filesystem locations.
Published: 2026-08-19
Score: 8.4 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

GitPython versions prior to 3.1.58 do not validate submodule names in .gitmodules files. A malicious repository can include traversal sequences in a submodule name, causing GitPython to create a repository at an arbitrary path outside the intended clone directory during submodule initialization. This results in unauthorized file creation or modification, which can be leveraged for code execution or persistence.

Affected Systems

The vulnerability affects the GitPython library developed by the GitPython developers. All releases before 3.1.58 are impacted. Users integrating GitPython into applications that clone or initialize submodules are exposed.

Risk and Exploitability

The CVSS score of 8.4 indicates a high severity impact. EPSS is not available, and the issue is not listed in CISA KEV, suggesting limited public exploitation data. Attackers can exploit this by delivering a crafted .gitmodules file when the application processes a repository; the attack vector is inferred to be remote when the library is used in a service exposed to untrusted input.

Generated by OpenCVE AI on August 19, 2026 at 19:01 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade GitPython to version 3.1.58 or later
  • Reject or sanitize submodule names containing traversal patterns in .gitmodules files as a temporary workaround
  • Run GitPython in a restricted or isolated environment to limit filesystem access

Generated by OpenCVE AI on August 19, 2026 at 19:01 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 19 Aug 2026 19:15:00 +0000

Type Values Removed Values Added
First Time appeared Gitpython-developers
Gitpython-developers gitpython
Vendors & Products Gitpython-developers
Gitpython-developers gitpython

Wed, 19 Aug 2026 14:15:00 +0000

Type Values Removed Values Added
Description GitPython before 3.1.58 fails to validate submodule names from .gitmodules files, allowing attackers to create Git repositories at arbitrary filesystem paths outside the intended clone directory. Attackers can craft malicious repositories with traversal sequences in submodule names that GitPython processes during submodule initialization, creating attacker-controlled Git repositories at escaped filesystem locations.
Title GitPython before 3.1.58 Path Traversal via .gitmodules Submodule Name
First Time appeared Gitpython Project
Gitpython Project gitpython
Weaknesses CWE-22
CPEs cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:*:*:*
Vendors & Products Gitpython Project
Gitpython Project gitpython
References
Metrics cvssV3_1

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

cvssV4_0

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


Subscriptions

Gitpython-developers Gitpython
Gitpython Project Gitpython
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-19T14:02:05.596Z

Reserved: 2026-08-19T11:35:13.689Z

Link: CVE-2026-76222

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-19T14:17:48.603

Modified: 2026-08-19T14:17:48.603

Link: CVE-2026-76222

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-19T19:15:17Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')