Уязвимость выполнения сценариев при клонировании репозиториев Git на файловые системы с нечувствительностью к регистру символов через символические ссылки и фильтры clean/smudge
Описание
Git — это распределённая система управления версиями с открытым исходным кодом. В затронутых версиях Git специально созданный репозиторий, содержащий символические ссылки, а также файлы, использующие фильтры clean/smudge, такие как Git LFS, может привести к выполнению только что извлечённого скрипта при клонировании на файловую систему, нечувствительную к регистру символов, такую как NTFS, HFS+ или APFS (т.е. файловые системы по умолчанию на Windows и macOS). Для этого необходимо наличие настроенных фильтров clean/smudge. Git для Windows настраивает Git LFS по умолчанию, что делает его уязвимым.
Затронутые версии ПО
- Наиболее ранняя затронутая версия — 2.14.2. Проблема исправлена в версиях, выпущенных во вторник, 9 марта 2021 года.
Тип уязвимости
Выполнение произвольного сценария
Способы защиты
- Отключить поддержку символических ссылок в Git, например, с помощью команды
git config --global core.symlinks false. - Не настраивать глобальные фильтры
clean/smudge, такие как Git LFS, до клонирования. - Избегать клонирования репозиториев из недоверенных источников.
Ссылки
- ExploitThird Party AdvisoryVDB Entry
- Mailing ListThird Party Advisory
- ExploitMailing ListThird Party Advisory
- Vendor Advisory
- Vendor Advisory
- PatchThird Party Advisory
- Third Party Advisory
- Mailing ListThird Party Advisory
- Third Party Advisory
- Third Party Advisory
- ExploitThird Party AdvisoryVDB Entry
- Mailing ListThird Party Advisory
- ExploitMailing ListThird Party Advisory
- Vendor Advisory
- Vendor Advisory
- PatchThird Party Advisory
Уязвимые конфигурации
Одно из
Одно из
Одновременно
EPSS
8 High
CVSS3
7.5 High
CVSS3
5.1 Medium
CVSS2
Дефекты
Связанные уязвимости
Git is an open-source distributed revision control system. In affected versions of Git a specially crafted repository that contains symbolic links as well as files using a clean/smudge filter such as Git LFS, may cause just-checked out script to be executed while cloning onto a case-insensitive file system such as NTFS, HFS+ or APFS (i.e. the default file systems on Windows and macOS). Note that clean/smudge filters have to be configured for that. Git for Windows configures Git LFS by default, and is therefore vulnerable. The problem has been patched in the versions published on Tuesday, March 9th, 2021. As a workaound, if symbolic link support is disabled in Git (e.g. via `git config --global core.symlinks false`), the described attack won't work. Likewise, if no clean/smudge filters such as Git LFS are configured globally (i.e. _before_ cloning), the attack is foiled. As always, it is best to avoid cloning repositories from untrusted sources. The earliest impacted version is 2.14....
Git is an open-source distributed revision control system. In affected versions of Git a specially crafted repository that contains symbolic links as well as files using a clean/smudge filter such as Git LFS, may cause just-checked out script to be executed while cloning onto a case-insensitive file system such as NTFS, HFS+ or APFS (i.e. the default file systems on Windows and macOS). Note that clean/smudge filters have to be configured for that. Git for Windows configures Git LFS by default, and is therefore vulnerable. The problem has been patched in the versions published on Tuesday, March 9th, 2021. As a workaound, if symbolic link support is disabled in Git (e.g. via `git config --global core.symlinks false`), the described attack won't work. Likewise, if no clean/smudge filters such as Git LFS are configured globally (i.e. _before_ cloning), the attack is foiled. As always, it is best to avoid cloning repositories from untrusted sources. The earliest impacted version is 2.14....
Git for Visual Studio Remote Code Execution Vulnerability
Git is an open-source distributed revision control system. In affected ...
EPSS
8 High
CVSS3
7.5 High
CVSS3
5.1 Medium
CVSS2