Skip to main content

nvm CVE-2026-94185

| EUVDEUVD-2026-83825 MEDIUM
Path Traversal (CWE-22)
2026-09-21 harborist
6.7
CVSS 4.0 · Vendor: harborist
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Publish repo with malicious .nvmrc traversal payload
  2. Delivery
    Victim clones and runs nvm use/install/which
  3. Exploit
    nvm_alias escapes $NVM_DIR/alias with '..'
  4. Execution
    nvm_print_alias_file reads target file
  5. Impact
    First line of ~/.npmrc token leaked in error message

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires the victim to execute nvm (specifically 'nvm use', 'nvm install', or 'nvm which') inside an attacker-controlled directory containing a crafted .nvmrc whose version string embeds a '..' traversal component, OR the victim manually running 'nvm alias <traversing-name>'. nvm version must be before 0.40.8. Exploitation is local (AV:L) and gated by user interaction (UI:R) - the attacker cannot trigger it remotely; the payload runs only when the developer voluntarily invokes an nvm command in the poisoned repo. The disclosed target must be a file readable by the invoking user, and the default $NVM_DIR layout is assumed for home-directory targets like ../../.npmrc. Limiting factor: the automated .nvmrc vector reveals only the first non-comment/non-empty line, so it is most impactful against single-line secrets.

Impact

This is a genuine but moderate-severity local information-disclosure flaw, correctly scored by the vendor at CVSS 5.5 (AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N). The vector confirms local attack surface requiring user interaction, no authentication, and confidentiality-only impact - there is no integrity, availability, or code-execution consequence on this path per the description. No EPSS score, no CISA KEV listing, and no public exploit are present in the provided intelligence, so the classification is 'no public exploit identified at time of analysis.' The realistic risk is bounded by the exploitation model: the dangerous automated vector (a poisoned .nvmrc in an attacker-supplied repo) leaks only the FIRST non-comment line of a target file, while full-file disclosure requires the victim to type a traversing name into 'nvm alias' themselves. That single-line limit is not trivial, however, because credential files like ~/.npmrc store the auth token (_authToken=...) as one line, so one line can equal one full secret. Net: not a drop-everything emergency (local, UI-gated, no RCE), but a legitimate developer-workstation supply-chain-adjacent risk worth patching to 0.40.8.

Exploit ScenarioDerived

An attacker publishes a repository containing a malicious .nvmrc whose version string is a traversal payload such as '../../.npmrc'. A developer clones it and runs 'nvm use', 'nvm install', or 'nvm which' during normal workflow; nvm reads the escaped path and echoes the first non-comment line - potentially an npm auth token - inside the 'is not yet installed' error message. No public exploit code is identified, but the technique is fully described in the GHSA advisory and trivially reproducible.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 21, 2026

Information disclosure in nvm versions before 0.40.8 allows a local attacker who controls a repository to read arbitrary files readable by the invoking user when the developer runs nvm use, nvm install, or nvm which with a crafted .nvmrc, or when the user manually runs nvm alias with a traversing name. The path traversal in alias resolution causes nvm to print non-comment lines from the opened file in an error message; the automated .nvmrc route exposes only the first non-comment/non-empty line, while the manual nvm alias route can expose all such lines. No public exploit code or active exploitation has been identified at time of analysis, and the vendor addressed the issue in nvm 0.40.8.

RemediationAI

Upgrade to nvm 0.40.8 or later, which contains the vendor fix for the alias path traversal; see the advisory at https://github.com/nvm-sh/nvm/security/advisories/GHSA-8grh-q73j-ffrc. If immediate upgrade is not possible, avoid running nvm use, nvm install, or nvm which inside untrusted repositories containing attacker-controlled .nvmrc files, and inspect or sanitize .nvmrc version strings before invoking nvm; this reduces exposure to the automated first-line disclosure but does not address manual nvm alias misuse. Do not run nvm alias with untrusted alias names. Because the flaw relies on file read access already available to the invoking user, file-permission hardening is not a complete mitigation, and the primary fix remains the upgrade to 0.40.8 or later.

Affected VersionsENISA

nvm 0 ≤0.40.7

Affected Packages

euvd nvm no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

nvm (Node Version Manager) resolves requested versions and aliases by looking them up as filenames under $NVM_DIR/alias. In affected versions before 0.40.8, nvm_alias() concatenated the requested name onto that directory and opened it without a containment check, so a name containing .. could escape the alias directory; with 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 file was opened. The vulnerability is a CWE-22 path traversal. A version string from an untrusted .nvmrc reaches this code path, so a developer running nvm commands inside an attacker-supplied repository can disclose the first non-comment line of an arbitrary readable file through the resulting 'is not yet installed' error message; a user-supplied nvm alias <traversing-name> can disclose every non-comment line of the target file. The issue is local (AV:L), requires user interaction (UI:R), requires no privileges (PR:N), and has high confidentiality impact (C:H) but no integrity or availability impact (I:N/A:N). There is no command execution on this path. The CPE cpe:2.3:a:nvm-sh:nvm:*:*:*:*:*:*:*:* identifies the affected nvm-sh nvm product.

Know when Nvm gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (harborist) PRIMARY 6.7 MEDIUM
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
vuln.today AI 5.5 MEDIUM

Local file read triggered when a user runs nvm in an attacker repo, so AV:L and UI:R; no auth needed (PR:N); confidentiality-only (single line can be a full credential → C:H).

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
4.0 AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (harborist).

CVSS VectorVendor: harborist

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Active
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
CVSS changed
Sep 21, 2026 - 03:22 NVD
5.5 (MEDIUM) 6.7 (MEDIUM)
CVE Published
Sep 21, 2026 - 02:27 cve.org
MEDIUM 5.5

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.3%
Top 78% exploitable
Prevalence
High
nvm is a ubiquitous Node version manager across developer workstations
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in Nvm

View all
CVE-2026-10796 HIGH
7.5 Jun 04

Command injection in nvm (Node Version Manager) versions through 0.40.4 allows attackers controlling the configured Node

CVE-2026-118905 HIGH
7.1 Oct 29

OS command injection in Node Version Manager (nvm) 0.31.2 through 0.40.5 lets an attacker-influenced version string brea

CVE-2026-121747 MEDIUM
6.7 Nov 04

Information disclosure in Node Version Manager (nvm) versions 0.2.0 through 0.40.8 allows a repository or archive that s

CVE-2026-121746 MEDIUM
6.7 Nov 04

Node Version Manager (nvm) 0.40.0 through 0.40.8 writes the pinned version with `tee` into `$PWD/.nvmrc`, which follows

CVE-2026-121749 MEDIUM
4.6 Nov 04

Argument injection in Node Version Manager (nvm) 0.5.0 through 0.40.8 lets a malicious `.nvmrc` smuggle grep options and

CVE-2026-121751 LOW
2.1 Nov 04

Node Version Manager (nvm) 0.39.6 through 0.40.8 contains a command injection path in which the version column of a Node

CVE-2026-15921 LOW
2.1 Jul 15

Path traversal in nvm versions 0.32.1 through 0.40.5 allows a hostile Node.js mirror to overwrite arbitrary files in the

CVE-2026-121750 LOW
2.1 Nov 04

nvm versions 0.40.5 through 0.40.8 can be made to install and execute a tampered Node.js release tarball that its own ch

CVE-2026-121745 LOW
2.0 Nov 04

nvm 0.40.0 through 0.40.8 leaks the opt-in NVM_AUTH_HEADER mirror credential to other local users because nvm_download p

CVE-2026-121748 LOW
1.8 Nov 04

File corruption and permission weakening in Node Version Manager (nvm) 0.27.0 through 0.40.8 arise when a project `.npmr

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy