[GHSA-cv3v-7846-6pxm] Unauthorized File Access in node-git-server#8016
Merged
advisory-database[bot] merged 1 commit intoJul 17, 2026
Conversation
Copilot stopped work on behalf of
RainSignal due to an error
June 11, 2026 18:56
github-actions
Bot
changed the base branch from
main
to
RainSignal/advisory-improvement-8016
June 11, 2026 18:57
|
👋 This pull request has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the |
advisory-database
Bot
merged commit Jul 17, 2026
2246437
into
RainSignal/advisory-improvement-8016
4 checks passed
Contributor
|
Hi @RainSignal! Thank you so much for contributing to the GitHub Advisory Database. This database is free, open, and accessible to all, and it's people like you who make it great. Thanks for choosing to help others. We hope you send in more contributions in the future! |
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".