PT-2023-2928 · Git+10 · Git+10

0Xacb

+1

·

Published

2023-04-25

·

Updated

2025-11-04

·

CVE-2023-29007

CVSS v3.1

7.8

High

VectorAV: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.

Exploit

Fix

RCE

Special Elements Injection

Weakness Enumeration

Related Identifiers

ALSA-2023:3245
ALSA-2023:3246
ALSA-2023_3245
ALSA-2023_3246
ALSA-2025_16880
ALT-PU-2023-1675
ALT-PU-2023-1695
ALT-PU-2023-4135
BDU:2023-02908
CESA-2023_3246
CESA-2023_3263
CVE-2023-29007
DLA-3844-1
DLA-3867-1
DSA-5769-1
ELSA-2023-3245
ELSA-2023-3246
ELSA-2023-3263
GHSA-V48J-4XGG-4844
MGASA-2023-0163
OESA-2023-1269
OPENSUSE-SU-2024:12889-1
RHSA-2023:3192
RHSA-2023:3243
RHSA-2023:3245
RHSA-2023:3246
RHSA-2023:3247
RHSA-2023:3248
RHSA-2023:3263
RHSA-2023:3280
RHSA-2023:3382
RHSA-2023_3245
RHSA-2023_3246
RHSA-2023_3263
RLSA-2023:3246
RLSA-2023_3246
ROSA-SA-2023-2176
ROSA-SA-2024-2398
SUSE-SU-2023:2038-1
SUSE-SU-2023:2038-2
SUSE-SU-2023:2062-1
SUSE-SU-2023:2081-1
SUSE-SU-2023_2038-1
SUSE-SU-2023_2038-2
SUSE-SU-2023_2062-1
SUSE-SU-2023_2081-1
USN-6050-1
USN-6050-2

Affected Products

Alt Linux
Almalinux
Astra Linux
Centos
Git
Linuxmint
Red Hat
Red Os
Rocky Linux
Suse
Ubuntu