# isomorphic-git: NTFS .git::$INDEX_ALLOCATION alias bypass writes into the active gitdir

isomorphic-git's .git name validation misses NTFS `.git::$INDEX_ALLOCATION` alias, letting a malicious repo overwrite real .git/config and hooks during clone on Windows.

- Payout: Research
- Severity: high
- Program: isomorphic-git
- Found by: the-vibe-dev
- Disclosed: 2026-11-30
- CVE: CVE-2026-77355
- Write-up quality: 8/10
- Original: https://github.com/advisories/GHSA-6fxm-h49m-4fg3
- Library page: https://bugbountylibrary.com/r/ghsa%3AGHSA-6fxm-h49m-4fg3
- Tags: area:oss domain:oss impact:integrity impact:rce kind:research platform:ghsa sev:high tech:nodejs tech:windows technique:chained technique:source-review vuln:path-traversal vuln:rce

**Target:** npm library tree parser / checkout path validation
**Root cause:** GitTree.js normalizes entry names and rejects `.git`, `..`, and `git~1`-`git~9`, but not colon-suffixed NTFS alternate-stream forms like `.git::$INDEX_ALLOCATION`, which NTFS resolves to the real `.git` directory. The symlink check on leading components doesn't catch it because the alias resolves as a directory.
**Steps:**
1. Build a bare repo whose root tree contains an entry named `.git::$INDEX_ALLOCATION` with attacker files (e.g. `config` with `core.fsmonitor` and `hooks/vantix-fsmonitor.bat`).
2. Serve it over loopback Smart HTTP via `git http-backend`.
3. Clone with `isomorphic-git@1.38.6` on Windows NTFS; checkout writes into the real `.git` directory.
4. Verify real `.git/config` and `.git/hooks/vantix-fsmonitor.bat` are attacker-controlled.
5. Run native `git status`; it reads poisoned `core.fsmonitor` and executes the batch file, creating `VANTIX_MARKER.txt`.
**How found:** Compared isomorphic-git's `.git` validation against native Git's `is_ntfs_dotgit()`; noticed the code comments claim parity but the implementation omits NTFS alternate-stream (colon-suffixed) forms, then tested parser acceptance of `.git::$INDEX_ALLOCATION`.
**Exploitation:** Attacker controls the cloned object stream (self-hosted/permissive remote). On Windows NTFS, isomorphic-git checkout follows the `.git::$INDEX_ALLOCATION` alias and overwrites real gitdir files. Poisoned `core.fsmonitor` in `.git/config` causes a later native `git status` to execute the dropped hook as the victim/CI user.
**Escalation:** gitdir write primitive chained to native Git's fsmonitor execution for code execution under the developer or CI identity.
**Insight:** When a library claims to mirror native Git's `is_ntfs_dotgit()`, diff the actual character/alias set: NTFS alternate data streams (`.git:`, `.git::$INDEX_ALLOCATION`, `.git::$DATA`) and 8.3 short names are the usual gaps, and a directory-resolving alias defeats symlink-only hardening.

## Proof of concept (copied exactly from the original report)

**Parser test accepting .git::$INDEX_ALLOCATION alias**

```
{
  ".git": { "accepted": false },
  ".GIT ": { "accepted": false },
  "git~1": { "accepted": false },
  ".git::$INDEX_ALLOCATION": { "accepted": true }
}
```

**PowerShell command running the PoC script**

```
cd .\poc
powershell -ExecutionPolicy Bypass -File .\run-poc.ps1
```

