Skip to main content

CVE-2026-94185: CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in nvm-sh nvm

0
Medium
VulnerabilityCVE-2026-94185cvecve-2026-94185cwe-22cwe-200
Published: 09/21/2026 (09/21/2026, 02:27:00 UTC)
Source: CVE Database V5
Vendor/Project: nvm-sh
Product: nvm

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 v3.1

Score 5.5medium

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N

Affected software

nvm-sh

nvm

Affected versions
>=0 <=0.40.7
GitHub Actionsmore threats →cve
nvm
pkg:github/nvm
Affected versions
>=0 <=0.40.7

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

Technical Details

Data Version
5.2
Assigner Short Name
harborist
Date Reserved
2026-09-21T02:14:56.481Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 6ab09ab455bf5e2cf51ade93

Added to database: 09/21/2026, 02:47:16 UTC

Last updated: 09/21/2026, 02:47:16 UTC

Views: 1

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses