[GHSA-cv3v-7846-6pxm] Unauthorized File Access in node-git-server#8016
Open
RainSignal wants to merge 1 commit into
Open
[GHSA-cv3v-7846-6pxm] Unauthorized File Access in node-git-server#8016RainSignal wants to merge 1 commit into
RainSignal wants to merge 1 commit into
Conversation
Copilot stopped work on behalf of
RainSignal due to an error
June 11, 2026 18:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates
Comments
The advisory states "All versions before 0.6.1" without specifying
a start version. Code review shows:
Version 0.1.0 does NOT contain the vulnerable code:
https://github.com/gabrielcsapo/node-git-server/tree/0.1.0
The lib/ directory in 0.1.0 only contains: basicAuth.js, handle.js,
info.js, no_cache.js, onexit.js, service.js. There is no git.js and
the Git class with the dirMap logic does not exist yet.
Version 0.2.0 DOES contain the vulnerable code:
https://github.com/gabrielcsapo/node-git-server/blob/0.2.0/lib/git.js
The constructor in 0.2.0 uses:
return path.resolve(repoDir, dir);
path.resolve() prioritizes the last absolute path argument, so if
an attacker passes a repository name starting with "/", the repoDir
is completely overridden:
path.resolve("/repos", "/etc") // returns /etc
Therefore the affected version range should start from 0.2.0,
not from "all versions".