CVE-2026-94185

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

  • Medium 6.7

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.

Key facts

Published
21 Sep 2026
Last changed
21 Sep 2026
Assigned by
harborist
EPSS
0.221% likely to be exploited in the next 30 days, higher than 12.8% of CVEs (scores for 16 Nov 2026)
SSVC (CISA)
Exploitation: none; Automatable: no; Technical impact: partial

Severity scores

Each score is shown as its source gave it. They are not averaged or merged.

  • 5.5CVSS 3.1, Mediumfrom the CNA (harborist)CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
  • 6.7CVSS 4.0, Mediumfrom the CNA (harborist)CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

Historical context and remediation

This reference retains the original CVE publication date. A recent record update does not mean a new attack occurred.

No separately sourced impact summary is available on this page yet. Consult the description, version data and dated exploitation evidence.

No explicit remediation statement is available on this page yet. Consult the original record and vendor references before choosing a fix.

Version statuses below come from the CNA. An “unaffected” version is not necessarily a currently supported release or proof of a patch date. EPSS is a dated risk estimate, not a count of historical attacks.

Read the original CVE record.

Affected products

VendorProductVersions
nvm-shnvm
  • Default status: unaffected
  • 0 up to and including 0.40.7 (affected)
  • 0.40.8 (unaffected)

Timeline

  1. 21 Sep 2026 Published

Weakness

Practice this bug class

HackZoneLabs has a hands-on lab on Path traversal (CWE-22).

References