isomorphic-git: NTFS .git::$INDEX_ALLOCATION alias bypass writes into the active gitdir
Package Affected versions Patched versions Description Summary [email protected] incompletely implements Git's reserved .git pathname validation.
Its tree parser rejects literal and normalized .gi
Package
isomorphic-git (npm)Affected versions
<= 1.38.6Patched versions
1.38.7Description
Summary
[email protected] 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:
823843d1cd19182df79bc907c767f5bcecb39a0b - npm tarball SHA-256:
d2547d46c0a23ef9fc6fb2052e01ff78c348ceb92d394be05b146bc790943858 - Platform required for the alias: Windows on NTFS
At the time of validation on 2026-07-10, 1.38.6 was the latest published version.
Severity
- An attacker can control the repository/object stream being cloned; the
supplied PoC uses self-hosted Smart HTTP because stricter hosting may reject
the malformed tree during fsck. - No privileges in the victim environment are required.
- The victim or automation must clone/check out the repository, and command
execution requires a later compatible Git/tool action. - The demonstrated follow-on executes as the victim developer or CI identity.
- Scope remains unchanged; the vulnerable workflow and impacted user account
are within the same security authority.
A maintainer may choose to score only the guaranteed gitdir-write primitive lower. The report intentionally does not claim direct command execution inside isomorphic-git.
Root cause
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:
- path separators;
.and..;- normalized
.git; and - selected
git~1throughgit~9aliases.
The 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.
The 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.
Reproduction
Requirements
- A disposable Windows VM using NTFS
- Node.js 20 or newer
- Git for Windows on
PATH - No third-party target; the PoC serves only on
127.0.0.1
Run
From the extracted package directory in PowerShell:
cd .\poc powershell -ExecutionPolicy Bypass -File .\run-poc.ps1
The script performs four checks:
- Builds a bare repository containing the raw root-tree entry
.git::$INDEX_ALLOCATION. - Serves it over loopback smart HTTP through
git http-backend. - Clones it with exact
[email protected]and verifies that the real
.git/configand real.git/hooks/vantix-fsmonitor.batare
attacker-controlled. - Confirms the marker is absent, runs native
git status, and verifies that
VANTIX_MARKER.txtis created. It also attempts a native Git clone of the
same URL as a negative control; native Git should refuse checkout.
Expected key output on Windows NTFS:
realConfigContainsFsmonitor: true
hookInRealGitdir: true
markerBeforeNativeGit: false
nativeGitStatusExit: 0
markerAfterNativeGit: true
The batch file only writes the text VANTIX_HTTP_CLONE_MARKER to a file inside the disposable victim directory.
Independently validated behavior
The 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:
{
".git": { "accepted": false },
".GIT ": { "accepted": false },
"git~1": { "accepted": false },
".git::$INDEX_ALLOCATION": { "accepted": true }
}
The included smart-HTTP PoC was also exercised on Linux as a transport/control
check. 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.
The original Windows replay evidence records:
[email protected]clone completed without error;- the real
.git/configwas overwritten; - the real hook file was written;
- the marker was absent before native Git;
git statusexited successfully and created the marker; and- native Git cloning the identical repository refused checkout.
Impact
A malicious repository can modify trusted repository metadata during clone or checkout on Windows NTFS. Depending on the written file, this can cause:
- local repository configuration poisoning;
- execution of configured commands when native Git or another compatible tool
later processes the clone; - corruption of refs, hooks, attributes, or other gitdir state; and
- compromise of the developer or CI account running the follow-on tool.
The proof uses core.fsmonitor because git status invokes it in a normal workflow. Other gitdir targets may provide additional integrity or availability impact.
isomorphic_git_1.38.6_ntfs_alias_submission.zip
References
- GHSA-6fxm-h49m-4fg3
- https://nvd.nist.gov/vuln/detail/CVE-2026-77355
- isomorphic-git/isomorphic-git#2376
- isomorphic-git/isomorphic-git@e5dbec6
- https://github.com/isomorphic-git/isomorphic-git/releases/tag/v1.38.7
Severity
High CVSS overall score This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS). / 10CVSS v3 base metrics
Attack vector Network Attack complexity Low Privileges required None User interaction Required Scope Unchanged Confidentiality High Integrity High Availability High CVSS v3 base metrics Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability. Attack complexity: More severe for the least complex attacks. Privileges required: More severe if no privileges are required. User interaction: More severe when no user interaction is required. Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope. Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user. Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user. Availability: More severe when the loss of impacted component availability is highest. CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:HEPSS score
Exploit Prediction Scoring System (EPSS) This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST. (39th percentile)Weaknesses
Weakness CWE-22Improper Limitation of a Pathname to a Restricted Directory
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. Learn more on MITRE.CVE ID
CVE-2026-77355GHSA ID
GHSA-6fxm-h49m-4fg3Source code
isomorphic-git/isomorphic-gitCredits
-
the-vibe-dev Reporter
Uh oh!
There was an error while loading. Please reload this page.
See something to contribute? Suggest improvements for this vulnerability.