---
id: CVE-2026-69097
title: >-
  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
summary: >-
  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
  dangerou…
severity: high
cvss: 7
cvssVector: 'CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H'
cwe:
  - CWE-74
  - CWE-78
vendor: gitpython_project
product: gitpython
affected:
  - gitpython < 3.1.53
patched:
  - gitpython 3.1.53
published: '2026-08-03'
updated: '2026-09-16'
sourceUpdated: '2026-09-16T20:45:54.883'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-69097'
references:
  - url: >-
      https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-3rp5-jjmw-4wv2
    label: disclosure@vulncheck.com
  - url: >-
      https://www.vulncheck.com/advisories/gitpython-before-config-injection-via-submodule-names
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-3rp5-jjmw-4wv2
    label: 134c704f-9b21-4f2e-91b3-4a467353bcc0
  - url: >-
      https://github.com/gitpython-developers/GitPython/commit/1ed1b924f4e2d2ee7bab296df77b978af21853f1
  - url: 'https://github.com/gitpython-developers/GitPython'
  - url: 'https://github.com/gitpython-developers/GitPython/releases/tag/3.1.53'
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-69097.json
  - url: 'https://access.redhat.com/security/cve/CVE-2026-69097'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2510651'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-69097'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-69097'
tags:
  - nvd
  - osv
  - pip
  - csaf
  - vex
  - red-hat
epss: 0.00268
epssPercentile: 0.1679
aliases:
  - GHSA-3rp5-jjmw-4wv2
  - PYSEC-2026-3981
ecosystem: pip
ingestedAt: '2026-08-04T19:12:33.236Z'
---

## Overview

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.

## Affected

- `gitpython < 3.1.53`

## Remediation

Upgrade past the affected range:

- `gitpython 3.1.53`

## Package advisory (CVE-2026-69097)

Affected packages:

- `gitpython < 3.1.53`

Patched in:

- `gitpython 3.1.53`

Source: https://osv.dev/vulnerability/GHSA-3rp5-jjmw-4wv2

## Vendor advisories

- **Red Hat VEX** · Moderate · affected: Exploit Intelligence, Migration Toolkit for Applications 8, Pen Drive Powered by Red Hat Lightspeed, Red Hat AI Inference Server, Red Hat Ansible Automation Platform 2, Red Hat Enterprise Linux AI (RHEL AI) 3, … · updated 2026-09-16 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-69097.json)
