CVE-2026-94185
published medium CVSS 4.0 · 6.7nvm alias resolution follows `..` and discloses files outside $NVM_DIR/alias
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| nvm-sh | — | nvm0 through 0.40.7 (affected · semver) · 0.40.8 (unaffected · semver) · Other versions: unaffected | Version-specific | Not stated | harborist |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 6.7 / 10
- Severity
- medium
- Provider
- harborist · cna
- Vector string
- 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
- Scenarios
- en: GENERAL
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 5.5 | medium | harborist · cna | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N | en: GENERAL |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| nvm-sh | nvm | 0 through 0.40.7 (affected · semver)0.40.8 (unaffected · semver)Default: unaffected | harborist · cna |
Weaknesses
2- CWE-22 CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
- CWE-200 CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
References
1- GHSA-8grh-q73j-ffrc https://github.com/nvm-sh/nvm/security/advisories/GHSA-8grh-q73j-ffrc
Provider assertions
2harborist · cna
nvm alias resolution follows `..` and discloses files outside $NVM_DIR/alias
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 5f8e0555bf35dc47cca7df153848fc4829b0cab7c623315e7b2480289e226505
- Ingested
- 23 Sep 2026, 09:40:48 UTC
- Source record
- Official CVE record