Skip to main content

Node Version Manager EUVDEUVD-2026-117129

| CVE-2026-121748 LOW
External Control of File Name or Path (CWE-73)
2026-11-04 harborist
1.8
CVSS 4.0 · Vendor: harborist
View

Attack ChainAIDerived

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

  1. Access
    Plant malicious .npmrc in cloned repo or shared dir
  2. Exploit
    Victim runs nvm use then nvm use --delete-prefix
  3. Execution
    npm rewrites attacker-selected config file
  4. Impact
    Corrupt ~/.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 prefix plus a file-selecting directive - userconfig=<path>, or location=global with globalconfig=<path>; (2) the victim running nvm use in that directory on an affected nvm (0.27.0-0.40.8) and then following nvm's own suggestion to run nvm use --delete-prefix; and (3) local access on the same machine. Limiting factors that reduce real-world risk: it is local only (AV:L), demands active victim interaction (the victim must run the specific --delete-prefix command), the attacker controls which file is targeted but not the bytes written, no project code executes, and it is fixed in v0.41.0 (updating is the vendor's fix).

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 prefix plus directives like userconfig=~/.bashrc (or location=global with globalconfig=<sensitive file>). The victim clones it, runs nvm use, is told to run nvm use --delete-prefix, and npm - having loaded the untrusted project .npmrc first - rewrites the attacker-named file as ini (corrupting ~/.bashrc) or leaves it at mode 0666 so another local user can write to it. No public exploit code is identified; exploitation requires the victim to actively run the suggested command locally.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.1% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – 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

nvm 0.27.0 <0.41.0

Affected Packages

euvd nvm fix: 0.41.0

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

Vendor (harborist) PRIMARY 1.8 LOW
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
vuln.today AI 3.6 LOW

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.

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

Primary rating from Vendor (harborist).

CVSS VectorVendor: harborist

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

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

EPSS Score
0.1%
Top 98% exploitable
Prevalence
High
extremely popular Node version manager on developer and CI machines
Data Quality
5 sources
Confidence: Medium

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 LOW
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.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· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact· derived
High

Priority Score

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

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-94185 MEDIUM
6.7 Sep 21

Information disclosure in nvm versions before 0.40.8 allows a local attacker who controls a repository to read arbitrary

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

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