PT-2023-2928
CVE-2023-29007
·
Published
2023-04-25
·
Updated
2026-10-10
Description by
CVSS 3.1
7.8
HighMetricsAV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions
Git versions prior to 2.30.9, 2.31.8, 2.32.7, 2.33.8, 2.34.8, 2.35.8, 2.36.6, 2.37.7, 2.38.5, 2.39.3, and 2.40.1
Description
The issue is related to insufficient neutralization of special elements in a request, which can allow an attacker to execute arbitrary code. A specially crafted
.gitmodules file with submodule URLs longer than 1024 characters can be used to exploit a bug in config.c::git config copy or rename section in file(). This bug can inject arbitrary configuration into a user's $GIT DIR/config when attempting to remove the configuration section associated with that submodule. The attacker can inject configuration values that specify executables to run, such as core.pager, core.editor, core.sshCommand, etc., leading to remote code execution.Recommendations
To resolve the issue, update to versions 2.30.9, 2.31.8, 2.32.7, 2.33.8, 2.34.8, 2.35.8, 2.36.6, 2.37.7, 2.38.5, 2.39.3, or 2.40.1.
As a temporary workaround, avoid running
git submodule deinit on untrusted repositories or without prior inspection of any submodule sections in $GIT DIR/config.Exploitability
Exploit
Fix
Impacts
Researchers
Vendors
Affected products
Found an issue in the description? Have something to add? Feel free to write us 👾