Description
GitPython before 3.1.53 fails to properly escape section names in git config files, allowing attackers to inject arbitrary configuration directives through malicious submodule names. Attackers can inject core.sshCommand or other dangerous config keys into the victim's .git/config via create_submodule or clone_from operations, achieving remote code execution when git performs ssh operations.
Published: 2026-08-03
Score: 7.3 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

GitPython versions prior to 3.1.53 do not properly escape section names in git config files, which allows an attacker to inject arbitrary configuration directives through malicious submodule names. When an attacker creates a submodule or clones a repository, the injected values are written to the victim's .git/config, enabling the execution of arbitrary commands by specifying dangerous keys such as core.sshCommand. This flaw can lead to full remote code execution whenever git performs ssh operations.

Affected Systems

The vulnerable product, developed by gitpython-developers and named GitPython, is a tool used for programmatic interactions with Git repositories. All GitPython releases before 3.1.53 are affected, and the flaw is present in both create_submodule and clone_from operations. Systems that rely on older GitPython versions, especially in automated build, CI/CD, or deployment scripts, are at risk.

Risk and Exploitability

The vulnerability carries a CVSS score of 7.3, indicating a high severity level. No EPSS score is available, and the issue is not currently listed in the CISA KEV catalog. Based on the description, the attack vector is inferred to involve the execution of malicious submodule names in a repository that an attacker can influence, such as through a compromised fork or a crafted repository accessed by the target. An attacker with the ability to cause the target to run clone_from or create_submodule with such names could leverage the injected config to achieve remote code execution.

Generated by OpenCVE AI on August 4, 2026 at 21:06 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to GitPython 3.1.53 or later, which removes the injection vulnerability.
  • Validate or sanitize submodule names before they are passed to GitPython, ensuring they originate from trusted sources.
  • Avoid using clone_from or create_submodule with untrusted or user‑supplied data in critical environments, or apply temporary runtime checks to reject names containing configuration delimiters.

Generated by OpenCVE AI on August 4, 2026 at 21:06 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 14 Aug 2026 17: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

Mon, 03 Aug 2026 16:00:00 +0000

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

Mon, 03 Aug 2026 15:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Mon, 03 Aug 2026 13:45:00 +0000

Type Values Removed Values Added
Description GitPython before 3.1.53 fails to properly escape section names in git config files, allowing attackers to inject arbitrary configuration directives through malicious submodule names. Attackers can inject core.sshCommand or other dangerous config keys into the victim's .git/config via create_submodule or clone_from operations, achieving remote code execution when git performs ssh operations.
Title GitPython before 3.1.53 Config Injection via Submodule Names
Weaknesses CWE-74
References
Metrics cvssV3_1

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

cvssV4_0

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


Subscriptions

Gitpython-developers Gitpython
Gitpython Project Gitpython
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-14T16:51:15.177Z

Reserved: 2026-08-03T10:44:14.336Z

Link: CVE-2026-69097

cve-icon Vulnrichment

Updated: 2026-08-03T14:16:12.312Z

cve-icon NVD

Status : Received

Published: 2026-08-03T14:16:30.677

Modified: 2026-08-05T05:17:14.423

Link: CVE-2026-69097

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-04T21:15:03Z

Weaknesses
  • CWE-74

    Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')