Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessPlant malicious .npmrc in cloned repo or shared dir
-
ExploitVictim runs nvm use then nvm use --delete-prefix
-
Executionnpm rewrites attacker-selected config file
-
ImpactCorrupt ~/.bashrc or leave target file world-writable 0666
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V5 - File Handling File name/path control
|
| Exploitation Conditions | Exploitation requires all of: (1) a project .npmrc authored by the attacker (clone of a repo/archive, or a local user able to write a shared parent directory such as /tmp) that sets |
| Impact | All signals point the same way: this is a genuinely low-priority issue, not a high-CVSS finding dressed down. The vendor CVSS 4.0 base score is 1.8 (Low) and the vector is internally consistent with a local, interaction-heavy, low-impact flaw: AV:L (local context - attacker plants a file, victim acts locally), AT:P (a specific attack precondition must hold), UI:A (the victim must actively run a particular command), PR:N (the attacker needs no account), and impact limited to VI:L/VA:L with VC:N (no confidentiality loss). The vuln.today decision label is 'monitor', which aligns with the low score. EPSS is not provided in the input, so exploitation probability cannot be quantified here. The CVE is not listed in CISA KEV and no PoC or exploit-code reference is present (references are only the GHSA advisory and the fix commit), so there is no public exploit identified at time of analysis. The exploitation model is unusual: per the advisory the attacker chooses which file npm rewrites/exposes but not the bytes written, and no project code executes - so impact is file corruption (e.g. ~/.bashrc re-serialized as ini) or a world-writable 0666 config file enabling a separate local user to tamper later, rather than direct code execution or data theft. Net: a real but minor hygiene bug; patch on normal cadence. One input inconsistency: the 'Information Disclosure' tag conflicts with the CVSS (VC:N) and the actual integrity/availability nature of the flaw - see data_quality_flags. |
| Exploit ScenarioDerived | An attacker publishes a repository or archive containing a crafted project .npmrc that sets |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 04, 2026
File corruption and permission weakening in Node Version Manager (nvm) 0.27.0 through 0.40.8 arise when a project .npmrc supplies prefix and nvm tells the user to run nvm use --delete-prefix; npm then honors directives such as userconfig or location=global plus globalconfig and can rewrite the wrong file or leave it at mode 0666. An unauthenticated local attacker must control the project .npmrc and the victim must run the suggested command on the same machine, so exploitation is local, interaction-heavy, and low priority; the attacker selects the target file but not its contents, and no project code executes. No public exploit identified at time of analysis; the vendor-released patch is 0.41.0.
RemediationAI
Upgrade to nvm 0.41.0 or later, which is the vendor-released patch; the advisory is https://github.com/nvm-sh/nvm/security/advisories/GHSA-ccgf-7gv4-xg5h and the fix commit is https://github.com/nvm-sh/nvm/commit/4049296ca8eef2067517d8cfd5ef5c0e615daa10. Until upgrade, do not run nvm use --delete-prefix in an untrusted project directory, and instead edit that project's .npmrc to remove the prefix setting and any userconfig, globalconfig, or location directives, since the project .npmrc is not modified by --delete-prefix; this avoids the specific npm config-deletion path but does not change npm's general config-resolution behavior. Updating is the complete vendor fix.
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 is a POSIX shell function for managing Node.js versions. Its nvm_die_on_prefix helper runs npm config delete prefix and npm config delete globalconfig when nvm use --delete-prefix is invoked. Because npm walks up from the current directory and loads a project .npmrc before choosing which config file to edit, an attacker-controlled project file can set userconfig=~/.bashrc to make npm re-serialize that file as ini, corrupting it, or set location=global with globalconfig=<path> to leave the chosen file world-writable at mode 0666. This is CWE-73, external control of file name or path: the untrusted project file controls the target path, not the bytes written or code execution. The issue is present from 0.27.0 through 0.40.8 and fixed in 0.41.0 by pinning npm's --prefix and no longer letting the project .npmrc select which config file npm edits; CPE cpe:2.3:a:nvm-sh:nvm:*:*:*:*:*:*:*:* covers the nvm package. The advisory tags list Information Disclosure, Node.js, and nvm, while the assessed impact is local file corruption and permission weakening.
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:P/PR:N/UI:A/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N
Local file-planting (AV:L) that succeeds only if the victim has the triggering config and runs --delete-prefix (AC:H, UI:R); attacker needs no account (PR:N); no confidentiality, limited integrity/availability.
Primary rating from Vendor (harborist).
CVSS VectorVendor: harborist
DescriptionCVE.org
Node Version Manager (nvm) is a POSIX-compliant shell function for managing multiple node.js versions. In versions 0.27.0 through 0.40.8, when a project's .npmrc sets prefix, nvm use tells the user to run nvm use --delete-prefix, which runs npm config delete prefix and npm config delete globalconfig in the current directory without naming a config file. npm loads the project .npmrc before deciding which file to edit, so that file chooses the target: userconfig=~/.bashrc makes npm rewrite ~/.bashrc as ini (corrupting it), and location=global with globalconfig= leaves the chosen file at mode 0666, which on a shared machine lets another local user write to it. The attacker (the author of a cloned repository or archive, or a local user who can write a shared parent directory) chooses the file but not the bytes written, and no project code runs. Version 0.41.0 no longer lets a project .npmrc select which config file --delete-prefix edits.
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
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 nvm versions before 0.40.8 allows a local attacker who controls a repository to read arbitrary
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
EUVD-2026-117129
NVD
CVE.org
EPSS
GitHub
Exploit-DB