Уязвимость удалённого выполнения кода в "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
как временное решение.
Ссылки
- Mailing ListThird Party Advisory
- MitigationThird Party Advisory
- Mailing ListThird Party Advisory
- Third Party Advisory
- Mailing ListThird Party Advisory
- MitigationThird Party Advisory
- Mailing ListThird Party Advisory
- Third Party Advisory
Уязвимые конфигурации
Одно из
Одно из
EPSS
8.5 High
CVSS3
8.8 High
CVSS3
Дефекты
Связанные уязвимости
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...
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...
Git is an open source, scalable, distributed revision control system. ...
Уязвимость функции split_cmdline() распределенной системы управления версиями git, позволяющая нарушителю получить доступ к конфиденциальным данным, нарушить их целостность, а также вызвать отказ в обслуживании
EPSS
8.5 High
CVSS3
8.8 High
CVSS3