Medium severity · published Sep 21, 2026
CVE-2026-94185
nvm alias resolution follows `..` and discloses files outside $NVM_DIR/alias
5.5
CVSS
0.2%
EPSS
No
On KEV
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.
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
Attack vector
Local
Complexity
Low
Privileges
None
User interaction
Required
Confidentiality
High
Integrity
None
Availability
None
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.2% · higher than 13% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
NV
nvm · nvm-sh
through 0.40.7 · source: vendor
Affected product
NV
nvm
nvm-sh
More from nvm
7.5
CVE-2026-10796
nvm executes commands from a malicious Node.js mirror's version strings
7.0
CVE-2026-118905
nvm_ls lets an untrusted version string inject sed commands, executing arbitrary commands with GNU sed
5.4
CVE-2026-1665
Command Injection in nvm via NVM_AUTH_HEADER in wget code path
3.1
CVE-2026-15921
nvm path traversal via a malicious mirror's LTS codename writes outside the alias directory