CVE-2026-94185 nvm alias resolution follows `..` and discloses files outside $NVM_DIR/alias
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: no · technical impact: partial
Description
nvm resolves a requested version or alias by treating it as a filename under $NVM_DIR/alias. Before 0.40.8, nvm_alias() concatenated the requested name onto that directory and read the result with no containment check, so a name containing a .. component escaped the alias directory; under the default layout an alias such as ../../.npmrc resolves to a file in the user's home directory. nvm_print_alias_file() then emits every non-comment, non-empty line of whatever was opened. A version string taken from an untrusted .nvmrc reaches this path, so a developer who runs nvm use, nvm install, or nvm which inside an attacker-supplied repository discloses the first non-comment line of an arbitrary file readable by that user, in the resulting "is not yet installed" error message. A user-supplied nvm alias <traversing-name> discloses every non-comment line of the target file. There is no integrity or availability impact, and no command execution on this path.
Upgrade path
1 package: 1 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| nvm-sh nvm | <= 0.40.7 | after 0.40.7 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| nvm-sh nvm | <= 0.40.7 | No fix listed |
References
- GHSA-8grh-q73j-ffrc vendor-advisory
- ENISA EUVD EUVD-2026-83825 third-party-advisory