isomorphic-git — чистая реализация JavaScript Git for Node.js и браузеров. До 1.38.7 проверка записи дерева в src/models/GitTree.js не отклоняет зарезервированный псевдоним Windows NTFS .git::$INDEX_ALLOCATION. Когда clone() или checkout материализует управляемое злоумышленником дерево, содержащее этот псевдоним в Windows, используя файловую систему NTFS, псевдоним переходит в активный каталог .git и позволяет записывать в доверенные метаданные репозитория вместо обычного каталога worktree.
Таким образом, вредоносный репозиторий или поток объектов может отравлять конфигурацию репозитория, крюки, рефы, атрибуты или другое состояние gitdir. Строгий хостинг, который отвергает объекты hasDotgit, может блокировать созданное дерево, и системы, не относящиеся к NTFS, не интерпретируют имя пути как активный gitdir. isomorphic-git выполняет запись gitdir, но сам не выполняет записанный хук или конфигурацию; более позднее родное действие Git или совместимое средство, такое как обработка отравленного значения core.fsmonitor, может выполнять настроенные команды как разработчик жертвы или идентификатор CI. Эта проблема исправлена в версии 1.38.7.
Показать оригинальное описание (EN)
isomorphic-git is a pure JavaScript implementation of Git for Node.js and browsers. Prior to 1.38.7, tree-entry validation in src/models/GitTree.js does not reject the Windows NTFS reserved pathname alias .git::$INDEX_ALLOCATION. When clone() or checkout materializes an attacker-controlled tree containing this alias on Windows using an NTFS filesystem, the alias resolves to the active .git directory and permits writes to trusted repository metadata instead of a normal worktree directory. A malicious repository or object stream can therefore poison repository configuration, hooks, refs, attributes, or other gitdir state. Strict hosting that rejects hasDotgit objects can block the crafted tree, and non-NTFS systems do not interpret the pathname as the active gitdir. isomorphic-git performs the gitdir write but does not itself execute the written hook or configuration; a later native Git or compatible-tool action, such as processing a poisoned core.fsmonitor value, can execute configured commands as the victim developer or CI identity. This issue is fixed in version 1.38.7.
Характеристики атаки
Последствия
Строка CVSS v3.1