Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

nvd логотип

CVE-2022-39260

Опубликовано: 19 окт. 2022
Источник: nvd
CVSS3: 8.5
CVSS3: 8.8
EPSS Низкий

Уязвимость удалённого выполнения кода в "git shell" из-за переполнения массива аргументов в Git

Описание

git shell — это ограниченная оболочка для входа, предназначенная для реализации функциональности push/pull через SSH. Функция, разделяющая аргументы команды на массив, использует тип int для представления количества элементов массива. Это позволяет злоумышленникам вызвать переполнение значения, что приводит к произвольным записям в кучу. Поскольку сформированный массив передаётся в функцию execv(), уязвимость может быть использована для удалённого выполнения кода.

Эксплуатация возможна только если жертва разрешила доступ к git shell в качестве оболочки для входа.

Затронутые версии ПО

  • Git до 2.30.6, 2.31.5, 2.32.4, 2.33.5, 2.34.5, 2.35.5, 2.36.3 и 2.37.4

Тип уязвимости

Удалённое выполнение кода

Рекомендации

  • Обновить Git до версий 2.30.6, 2.31.5, 2.32.4, 2.33.5, 2.34.5, 2.35.5, 2.36.3 или 2.37.4.
  • Временно отключить доступ к git shell как временное решение.

Ссылки

Уязвимые конфигурации

Конфигурация 1

Одно из

cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
Версия до 2.30.6 (исключая)
cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
Версия от 2.31.0 (включая) до 2.31.5 (исключая)
cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
Версия от 2.32.0 (включая) до 2.32.4 (исключая)
cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
Версия от 2.33.0 (включая) до 2.33.5 (исключая)
cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
Версия от 2.34.0 (включая) до 2.34.5 (исключая)
cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
Версия от 2.35.0 (включая) до 2.35.5 (исключая)
cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
Версия от 2.36.0 (включая) до 2.36.3 (исключая)
cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
Версия от 2.37.0 (включая) до 2.37.4 (исключая)
cpe:2.3:a:git-scm:git:2.38.0:*:*:*:*:*:*:*
Конфигурация 2

Одно из

cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*
cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*
cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:*
Конфигурация 3
cpe:2.3:a:apple:xcode:*:*:*:*:*:*:*:*
Версия до 14.1 (исключая)
Конфигурация 4
cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*

EPSS

Процентиль: 82%
0.01844
Низкий

8.5 High

CVSS3

8.8 High

CVSS3

Дефекты

CWE-122
CWE-787

Связанные уязвимости

CVSS3: 8.5
ubuntu
больше 2 лет назад

Git is an open source, scalable, distributed revision control system. `git shell` is a restricted login shell that can be used to implement Git's push/pull functionality via SSH. In versions prior to 2.30.6, 2.31.5, 2.32.4, 2.33.5, 2.34.5, 2.35.5, 2.36.3, and 2.37.4, the function that splits the command arguments into an array improperly uses an `int` to represent the number of entries in the array, allowing a malicious actor to intentionally overflow the return value, leading to arbitrary heap writes. Because the resulting array is then passed to `execv()`, it is possible to leverage this attack to gain remote code execution on a victim machine. Note that a victim must first allow access to `git shell` as a login shell in order to be vulnerable to this attack. This problem is patched in versions 2.30.6, 2.31.5, 2.32.4, 2.33.5, 2.34.5, 2.35.5, 2.36.3, and 2.37.4 and users are advised to upgrade to the latest version. Disabling `git shell` access via remote logins is a viable short-t...

CVSS3: 8.8
redhat
больше 2 лет назад

Git is an open source, scalable, distributed revision control system. `git shell` is a restricted login shell that can be used to implement Git's push/pull functionality via SSH. In versions prior to 2.30.6, 2.31.5, 2.32.4, 2.33.5, 2.34.5, 2.35.5, 2.36.3, and 2.37.4, the function that splits the command arguments into an array improperly uses an `int` to represent the number of entries in the array, allowing a malicious actor to intentionally overflow the return value, leading to arbitrary heap writes. Because the resulting array is then passed to `execv()`, it is possible to leverage this attack to gain remote code execution on a victim machine. Note that a victim must first allow access to `git shell` as a login shell in order to be vulnerable to this attack. This problem is patched in versions 2.30.6, 2.31.5, 2.32.4, 2.33.5, 2.34.5, 2.35.5, 2.36.3, and 2.37.4 and users are advised to upgrade to the latest version. Disabling `git shell` access via remote logins is a viable short-t...

CVSS3: 8.5
debian
больше 2 лет назад

Git is an open source, scalable, distributed revision control system. ...

CVSS3: 8.8
fstec
больше 2 лет назад

Уязвимость функции split_cmdline() распределенной системы управления версиями git, позволяющая нарушителю получить доступ к конфиденциальным данным, нарушить их целостность, а также вызвать отказ в обслуживании

suse-cvrf
больше 2 лет назад

Security update for git

EPSS

Процентиль: 82%
0.01844
Низкий

8.5 High

CVSS3

8.8 High

CVSS3

Дефекты

CWE-122
CWE-787