CVE-2026-94185

published 21 Sep 2026 · updated 21 Sep 2026

nvm alias resolution follows `..` and discloses files outside $NVM_DIR/alias

5.5MediumCVSS 5.5EPSS 0%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. No fixed version is recorded.

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.

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
nvm-sh<=0.40.7

Timeline

Every event on this vulnerability

Embed

A live severity badge for an advisory, README or ticket

CVE-2026-94185 severity on Zeptric[![CVE-2026-94185](https://zeptric.io/badge/cve/CVE-2026-94185.svg)](https://zeptric.io/cve/CVE-2026-94185)