Уязвимость некорректной обработки конфигурации Git в Git for Windows при выполнении операций за пределами репозитория
Описание
В Git for Windows обнаружена уязвимость, влияющая на пользователей, работающих на многопользовательских машинах, где ненадёжные пользователи имеют доступ на запись к тому же жёсткому диску. Эти пользователи могут создать папку C:\.git
, которая будет использована Git при выполнении операций вне репозитория, и Git будет учитывать любую конфигурацию в данной папке Git. Пользователи Git Bash, которые установили GIT_PS1_SHOWDIRTYSTATE
, также подвержены этой уязвимости. Пользователи, которые установили posh-git, могут столкнуться с уязвимостью просто запустив PowerShell. Пользователи IDE, таких как Visual Studio, подвергаются риску: создание нового проекта автоматически считает и применит конфигурацию, указанную в C:\.git\config
. Пользователи Microsoft-версии Git уязвимы просто при запуске Git Bash.
Затронутые версии ПО
- Git for Windows до версии v2.35.2
Тип уязвимости
Некорректная обработка конфигурации Git при выполнении операций за пределами репозитория
Рекомендации
Проблема исправлена в Git for Windows версии v2.35.2. Пользователи, которые не могут обновиться, могут создать папку .git
на всех дисках, где выполняются команды Git, и удалить права на чтение/запись из неё.
Ссылки
- Mailing ListThird Party Advisory
- Mailing ListThird Party Advisory
- Vendor Advisory
- Vendor Advisory
- MitigationThird Party Advisory
- Mailing ListThird Party Advisory
- Third Party Advisory
- Mailing ListThird Party Advisory
- Mailing ListThird Party Advisory
- Vendor Advisory
Уязвимые конфигурации
Одновременно
Одно из
EPSS
6 Medium
CVSS3
7.8 High
CVSS3
6.9 Medium
CVSS2
Дефекты
Связанные уязвимости
Git for Windows is a fork of Git containing Windows-specific patches. This vulnerability affects users working on multi-user machines, where untrusted parties have write access to the same hard disk. Those untrusted parties could create the folder `C:\.git`, which would be picked up by Git operations run supposedly outside a repository while searching for a Git directory. Git would then respect any config in said Git directory. Git Bash users who set `GIT_PS1_SHOWDIRTYSTATE` are vulnerable as well. Users who installed posh-gitare vulnerable simply by starting a PowerShell. Users of IDEs such as Visual Studio are vulnerable: simply creating a new project would already read and respect the config specified in `C:\.git\config`. Users of the Microsoft fork of Git are vulnerable simply by starting a Git Bash. The problem has been patched in Git for Windows v2.35.2. Users unable to upgrade may create the folder `.git` on all drives where Git commands are run, and remove read/write access ...
Git for Windows is a fork of Git containing Windows-specific patches. This vulnerability affects users working on multi-user machines, where untrusted parties have write access to the same hard disk. Those untrusted parties could create the folder `C:\.git`, which would be picked up by Git operations run supposedly outside a repository while searching for a Git directory. Git would then respect any config in said Git directory. Git Bash users who set `GIT_PS1_SHOWDIRTYSTATE` are vulnerable as well. Users who installed posh-gitare vulnerable simply by starting a PowerShell. Users of IDEs such as Visual Studio are vulnerable: simply creating a new project would already read and respect the config specified in `C:\.git\config`. Users of the Microsoft fork of Git are vulnerable simply by starting a Git Bash. The problem has been patched in Git for Windows v2.35.2. Users unable to upgrade may create the folder `.git` on all drives where Git commands are run, and remove read/write access ...
GitHub: Uncontrolled search for the Git directory in Git for Windows
Git for Windows is a fork of Git containing Windows-specific patches. ...
EPSS
6 Medium
CVSS3
7.8 High
CVSS3
6.9 Medium
CVSS2