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.

Severity (CVSS)

Base score7.3
SeverityHigh
VersionCVSS 4.0
VectorCVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Provided byCNA

Weaknesses

  • CWE-74 — Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')

Affected products

VendorProductVersions
gitpython-developersGitPython0 to <3.1.53; 3.1.53

References

Authoritative sources

This page is a snapshot. For the latest enrichment and updates, view the record on CVE.org or the NVD.

Generated from the official CVE List on 04 Aug 2026 07:02 UTC.