Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessPublish repo with malicious .nvmrc traversal payload
-
DeliveryVictim clones and runs nvm use/install/which
-
Exploitnvm_alias escapes $NVM_DIR/alias with '..'
-
Executionnvm_print_alias_file reads target file
-
ImpactFirst 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
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
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).
Primary rating from Vendor (harborist).
CVSS VectorVendor: harborist
Lifecycle Timeline
2DescriptionCVE.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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
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.
Command injection in nvm (Node Version Manager) versions through 0.40.4 allows attackers controlling the configured Node
OS command injection in Node Version Manager (nvm) 0.31.2 through 0.40.5 lets an attacker-influenced version string brea
Information disclosure in Node Version Manager (nvm) versions 0.2.0 through 0.40.8 allows a repository or archive that s
Node Version Manager (nvm) 0.40.0 through 0.40.8 writes the pinned version with `tee` into `$PWD/.nvmrc`, which follows
Argument injection in Node Version Manager (nvm) 0.5.0 through 0.40.8 lets a malicious `.nvmrc` smuggle grep options and
Node Version Manager (nvm) 0.39.6 through 0.40.8 contains a command injection path in which the version column of a Node
Path traversal in nvm versions 0.32.1 through 0.40.5 allows a hostile Node.js mirror to overwrite arbitrary files in the
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
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
File corruption and permission weakening in Node Version Manager (nvm) 0.27.0 through 0.40.8 arise when a project `.npmr
EUVD-2026-83825
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB