{"id":"CVE-2026-77355","aliases":["CVE-2026-77355","GHSA-6fxm-h49m-4fg3"],"related":[],"kind":"vulnerability","state":"published","title":"isomorphic-git: NTFS .git::$INDEX_ALLOCATION alias bypass writes into the active gitdir","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"## Summary\n\n`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`.\n\nOn Windows NTFS, the directory name:\n\n```text\n.git::$INDEX_ALLOCATION\n```\n\naliases 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.\n\nThe 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.\n\nThe 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.\n\n## Affected product\n\n- Ecosystem: npm\n- Package: `isomorphic-git`\n- Affected version tested: `1.38.6`\n- Published package commit: `823843d1cd19182df79bc907c767f5bcecb39a0b`\n- npm tarball SHA-256:\n  `d2547d46c0a23ef9fc6fb2052e01ff78c348ceb92d394be05b146bc790943858`\n- Platform required for the alias: Windows on NTFS\n\nAt the time of validation on 2026-07-10, `1.38.6` was the latest published version.\n\n## Severity\n\n- An attacker can control the repository/object stream being cloned; the\n  supplied PoC uses self-hosted Smart HTTP because stricter hosting may reject\n  the malformed tree during fsck.\n- No privileges in the victim environment are required.\n- The victim or automation must clone/check out the repository, and command\n  execution requires a later compatible Git/tool action.\n- The demonstrated follow-on executes as the victim developer or CI identity.\n- Scope remains unchanged; the vulnerable workflow and impacted user account\n  are within the same security authority.\n\nA maintainer may choose to score only the guaranteed gitdir-write primitive lower. The report intentionally does not claim direct command execution inside isomorphic-git.\n\n## Root cause\n\n`src/models/GitTree.js` in `v1.38.6` normalizes entry names by removing selected HFS-ignorable characters, lowercasing, and stripping trailing dots/spaces. It then rejects:\n\n- path separators;\n- `.` and `..`;\n- normalized `.git`; and\n- selected `git~1` through `git~9` aliases.\n\nThe validation does not reject `.git:` or other colon-suffixed forms. The published code comments state that the checks mirror native Git's `is_ntfs_dotgit()` behavior, but native Git specifically treats NTFS alternate stream forms as unsafe.\n\nThe checkout leading-component hardening added in the same release checks for symbolic links. It does not stop an NTFS filesystem alias because the alias resolves as a directory, not a symlink.\n\n## Reproduction\n\n### Requirements\n\n- A disposable Windows VM using NTFS\n- Node.js 20 or newer\n- Git for Windows on `PATH`\n- No third-party target; the PoC serves only on `127.0.0.1`\n\n### Run\n\nFrom the extracted package directory in PowerShell:\n\n```powershell\ncd .\\poc\npowershell -ExecutionPolicy Bypass -File .\\run-poc.ps1\n```\n\nThe script performs four checks:\n\n1. Builds a bare repository containing the raw root-tree entry\n   `.git::$INDEX_ALLOCATION`.\n2. Serves it over loopback smart HTTP through `git http-backend`.\n3. Clones it with exact `isomorphic-git@1.38.6` and verifies that the real\n   `.git/config` and real `.git/hooks/vantix-fsmonitor.bat` are\n   attacker-controlled.\n4. Confirms the marker is absent, runs native `git status`, and verifies that\n   `VANTIX_MARKER.txt` is created. It also attempts a native Git clone of the\n   same URL as a negative control; native Git should refuse checkout.\n\nExpected key output on Windows NTFS:\n\n```text\nrealConfigContainsFsmonitor: true\nhookInRealGitdir: true\nmarkerBeforeNativeGit: false\nnativeGitStatusExit: 0\nmarkerAfterNativeGit: true\n```\n\nThe batch file only writes the text `VANTIX_HTTP_CLONE_MARKER` to a file inside the disposable victim directory.\n\n## Independently validated behavior\n\nThe published npm tarball was downloaded and hashed independently. Its SHA-256 matches the supplied evidence. A parser-level test against the exact published bundle produced the following result:\n\n```json\n{\n  \".git\": { \"accepted\": false },\n  \".GIT \": { \"accepted\": false },\n  \"git~1\": { \"accepted\": false },\n  \".git::$INDEX_ALLOCATION\": { \"accepted\": true }\n}\n```\n\nThe included smart-HTTP PoC was also exercised on Linux as a transport/control\ncheck. The clone completed, but Linux created a literal `.git::$INDEX_ALLOCATION` directory and did not overwrite `.git`, which matches the Windows/NTFS-specific impact claim. Native Git rejected checkout of the same crafted tree. `git fsck --full` also reported `hasDotgit: contains '.git'`, confirming why strict Git hosting may block direct publication of the object.\n\nThe original Windows replay evidence records:\n\n- `isomorphic-git@1.38.6` clone completed without error;\n- the real `.git/config` was overwritten;\n- the real hook file was written;\n- the marker was absent before native Git;\n- `git status` exited successfully and created the marker; and\n- native Git cloning the identical repository refused checkout.\n\n## Impact\n\nA malicious repository can modify trusted repository metadata during clone or checkout on Windows NTFS. Depending on the written file, this can cause:\n\n- local repository configuration poisoning;\n- execution of configured commands when native Git or another compatible tool\n  later processes the clone;\n- corruption of refs, hooks, attributes, or other gitdir state; and\n- compromise of the developer or CI account running the follow-on tool.\n\nThe proof uses `core.fsmonitor` because `git status` invokes it in a normal workflow. Other gitdir targets may provide additional integrity or availability impact.\n[isomorphic_git_1.38.6_ntfs_alias_submission.zip](https://github.com/user-attachments/files/29907514/isomorphic_git_1.38.6_ntfs_alias_submission.zip)","format":"markdown","source":"ghsa"}],"published":"2026-11-20T18:03:55.938Z","modified":"2026-11-30T19:45:23.552Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":"< 1.38.7","status":"affected"}],"vendor":"isomorphic-git","product":"isomorphic-git","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.38.7"}],"ecosystem":"npm","package":"isomorphic-git","purl":"pkg:npm/isomorphic-git","source":"ghsa"}],"references":[{"url":"https://github.com/isomorphic-git/isomorphic-git/security/advisories/GHSA-6fxm-h49m-4fg3","tags":["exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/isomorphic-git/isomorphic-git/pull/2376","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/isomorphic-git/isomorphic-git/commit/e5dbec689fab148fd5b518f3d4958c9d728886f9","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/isomorphic-git/isomorphic-git/releases/tag/v1.38.7","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-77355","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/isomorphic-git/isomorphic-git","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2026-11-20T19:15:57.256Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-77355","url":"https://www.cve.org/CVERecord?id=CVE-2026-77355","licence":"CVE Terms of Use","modified":"2026-11-20T19:16:20.276Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-6fxm-h49m-4fg3","url":"https://github.com/advisories/GHSA-6fxm-h49m-4fg3","licence":"CC-BY-4.0","modified":"2026-11-30T19:45:23.552Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-77355","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-77355","licence":"Public domain","modified":"2026-11-20T20:17:48.373Z"}],"updatedAt":"2026-11-30T20:07:24.761Z","epss":{"score":0.0088,"percentile":0.60214,"date":"2026-12-02T12:00:21.000Z"}}