{"id":"CVE-2026-77355","aliases":["GHSA-6fxm-h49m-4fg3"],"url":"https://o3.security/vulnerability/CVE-2026-77355","summary":"isomorphic-git: NTFS .git::$INDEX_ALLOCATION alias bypass writes into the active gitdir","details":"## 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)","published":"2026-11-20T18:03:55.938Z","modified":"2026-11-21T21:00:56.713006557Z","cvss":{"score":8.8,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"},"epss":{"score":0.00546,"percentile":0.39388,"asOf":"2026-11-30"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"isomorphic-git","fixedVersion":"1.38.7"}],"fix":{"url":"https://github.com/isomorphic-git/isomorphic-git/commit/e5dbec689fab148fd5b518f3d4958c9d728886f9","label":"isomorphic-git/isomorphic-git@e5dbec6"},"references":[{"type":"WEB","url":"https://github.com/isomorphic-git/isomorphic-git/releases/tag/v1.38.7"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/77xxx/CVE-2026-77355.json"},{"type":"ADVISORY","url":"https://github.com/isomorphic-git/isomorphic-git/security/advisories/GHSA-6fxm-h49m-4fg3"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-77355"},{"type":"FIX","url":"https://github.com/isomorphic-git/isomorphic-git/commit/e5dbec689fab148fd5b518f3d4958c9d728886f9"},{"type":"FIX","url":"https://github.com/isomorphic-git/isomorphic-git/pull/2376"},{"type":"PACKAGE","url":"https://github.com/isomorphic-git/isomorphic-git"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-11-21T21:00:56.713006557Z"}}