Skip to content

[GHSA-cv3v-7846-6pxm] Unauthorized File Access in node-git-server#8016

Open
RainSignal wants to merge 1 commit into
RainSignal/advisory-improvement-8016from
RainSignal-GHSA-cv3v-7846-6pxm
Open

[GHSA-cv3v-7846-6pxm] Unauthorized File Access in node-git-server#8016
RainSignal wants to merge 1 commit into
RainSignal/advisory-improvement-8016from
RainSignal-GHSA-cv3v-7846-6pxm

Conversation

@RainSignal

Copy link
Copy Markdown

Updates

  • Affected products

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".

Copilot stopped work on behalf of RainSignal due to an error June 11, 2026 18:56
@github-actions github-actions Bot changed the base branch from main to RainSignal/advisory-improvement-8016 June 11, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant