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.
OpenCVE Enrichment