本文へ移動
English version →
高 8.8

isomorphic-gitの脆弱性、Windows環境でgitdirへの書き込みを許すおそれ

CVE-2026-77355 SecPulse初出

概要

isomorphic-gitの1.38.7より前のバージョンには、Windowsで NTFSの予約名を使ったパスの検証が不十分な脆弱性があります。悪意のあるリポジトリをclone()やcheckoutで展開すると、有効な.gitディレクトリへ書き込まれ、設定やフックが改ざんされるおそれがあります。修正版の1.38.7で対処されています。

AI要約

SecPulse が外部の生成 AI を使って作った要約です。誤りを含むことがあります。重要な判断の前に、下の原文と参照URLを確認してください。

isomorphic-gitの1.38.7より前のバージョンには、Windowsで NTFSの予約名を使ったパスの検証が不十分な脆弱性があります。悪意のあるリポジトリをclone()やcheckoutで展開すると、有効な.gitディレクトリへ書き込まれ、設定やフックが改ざんされるおそれがあります。修正版の1.38.7で対処されています。

影響パッケージ

パッケージ影響を受ける版 → 修正版
isomorphic-gitisomorphic-git —
npmisomorphic-git
1.38.7 未満→ 1.38.7
原文の説明 取得元が公開している説明をそのまま載せています (多くは英語)。

Summary

isomorphic-git@1.38.6 incompletely implements Git's reserved .git pathname validation. Its tree parser rejects literal and normalized .git names and selected NTFS 8.3 aliases, but it does not reject a colon after .git.

On Windows NTFS, the directory name:

.git::$INDEX_ALLOCATION

aliases the real .git directory. A repository containing that tree entry can therefore cause clone() or checkout to write attacker-controlled files into trusted repository metadata. In the demonstrated proof, the clone replaces the real .git/config and writes a batch file under the real .git/hooks directory. A subsequent ordinary native git status reads the poisoned core.fsmonitor value and executes the marker-only batch file.

The guaranteed vulnerability is the gitdir write during isomorphic-git checkout. The command-execution step is a follow-on action by native Git or another compatible tool; isomorphic-git does not itself execute the hook.

The crafted tree may be rejected by hosting platforms that enforce Git fsck's hasDotgit check. The PoC therefore uses a researcher-controlled loopback Smart HTTP remote. The realistic reach is an untrusted or compromised self-hosted remote, a permissive Git service, or a malicious object streamintroduced in transit—not necessarily a repository hosted on GitHub.com.

Affected product

  • Ecosystem: npm
  • Package: isomorphic-git
  • Affected version tested: 1.38.6
  • Published package commit: `823843d1cd19182df…

出典: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory

参照URL

当サイトでは、アクセス解析と広告の効果測定のためにCookieを使います。株式会社Gameのサイト共通の設定です。 詳しく