CVE-2026-69097

GitPython before 3.1.53 Config Injection via Submodule Names

Published Aug 3, 2026 CVSS 4.0 · 7.3 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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.

Remediation

No solution or workaround provided in the CVE record.

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

Source ID Title
Debian DLA Debian DLA DLA-4872-1 python-git security update
Github GHSA Github GHSA GHSA-3rp5-jjmw-4wv2 GitPython: git-config section-name injection enables arbitrary config directives (core.sshCommand RCE)
History
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
Type Values Removed Values Added
First Time appeared Gitpython-developers
Gitpython-developers gitpython
Vendors & Products Gitpython-developers
Gitpython-developers gitpython
Type Values Removed Values Added
Metrics ssvc

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

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'}

Weaknesses
  • CWE-74

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

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Aug 14, 2026, 4:51 PM
Reserved
Aug 3, 2026, 10:44 AM
Status
Analyzed
Published
Aug 3, 2026, 2:16 PM
Modified
Oct 23, 2026, 9:10 PM