---
id: "GHSA-9xx9-hw38-h2w9"
kind: "vulnerability"
aliases: ["GHSA-9xx9-hw38-h2w9"]
title: "Duplicate Advisory: GitPython: git-config section-name injection enables arbitrary config directives (core.sshCommand RCE)"
severity: "high"
cvss: 7.0
epss: null
exploited: false
status: "withdrawn"
category: "package"
products: [{"name": "gitpython", "fixed": ["3.1.53"], "affected": "<= 3.1.52", "ecosystem": "pypi"}]
ecosystems: ["pypi"]
tags: ["cwe-74", "gitpython", "package", "python"]
not_affected_if: ["gitpython-3.1.53-or-later"]
published_at: "2026-08-03T15:32:49+00:00"
first_seen_at: "2026-10-23T21:51:54+00:00"
updated_at: "2026-10-23T21:52:57+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-9xx9-hw38-h2w9", "first_seen_at": "2026-10-23T21:51:54+00:00"}]
---

# Duplicate Advisory: GitPython: git-config section-name injection enables arbitrary config directives (core.sshCommand RCE)

GitPython before 3.1.53 does not escape section names when writing git config files, so a malicious submodule name can inject arbitrary config keys such as core.sshCommand. An attacker can get code run on the machine when git performs an ssh operation.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- pypi:gitpython affected <= 3.1.52 fixed 3.1.53

## How to check

Run pip show gitpython and check whether the version is 3.1.52 or lower.

## Fix

Upgrade gitpython to 3.1.53 or later; this advisory is withdrawn as a duplicate, so see GHSA-3rp5-jjmw-4wv2 for the live record.

## Timeline

- 2026-10-23T21:51:54+00:00 ghsa https://github.com/advisories/GHSA-9xx9-hw38-h2w9

## From the sources

# Duplicate Advisory
This advisory has been withdrawn because it is a duplicate of GHSA-3rp5-jjmw-4wv2. This link is maintained to preserve external references.

# Original 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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
