Skip to main content

Node Version Manager EUVDEUVD-2026-117126

| CVE-2026-121751 LOW
OS Command Injection (CWE-78)
2026-11-04 harborist
2.1
CVSS 4.0 · Vendor: harborist
View

Attack ChainAIDerived

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

  1. Access
    Control or MITM the Node.js mirror
  2. Delivery
    Serve index.tab with crafted version string
  3. Exploit
    nvm ls-remote stores it as LTS alias
  4. Execution
    Local nvm command evaluates it in shell arithmetic
  5. Impact
    Command substitution runs arbitrary code as user

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK

2 techniques across 1 tactic: Execution

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

Exploitation Conditions

Exploitation requires all of: (1) the victim resolving Node.js downloads through an attacker-controlled mirror - a compromised mirror or CDN, a network man-in-the-middle of an http:// mirror, or a maliciously configured NVM_NODEJS_ORG_MIRROR; (2) nvm versions 0.39.6 through 0.40.8 running under bash or zsh (dash rejects the payload and is not affected); and (3) the victim running a command that refreshes remote LTS aliases (nvm ls-remote, nvm version-remote) to persist the payload, followed by a purely local command that resolves the alias (nvm ls, nvm alias, nvm use --lts, nvm which lts/) - or no further action if the default alias is lts/*, in which case it fires in every new shell. A secondary, vendor-designated 'hardening' vector is a hostile project .nvmrc triggering the same sink on bare nvm use/install/which/exec/run. Limiting factors: attacker must control the mirror, the shell must be bash/zsh, and the user must run an affected nvm command.

Impact

Signals conflict in an instructive way. The vendor's CVSS 4.0 base score is 2.1 (low), driven by AT:P (a specific attack requirement - the victim must be using a hostile mirror) and UI:A (the victim must run an affected nvm command), plus a conservative impact rating of VC:N/VI:L/VA:N. However, the underlying flaw is CWE-78 command injection that runs arbitrary commands as the user, so the real technical impact is materially higher than a 2.1 implies - this is code execution in the user's context, not a mere low-integrity issue. No EPSS score was provided and the CVE is not in CISA KEV, so there is no evidence of active or widespread exploitation. The vuln.today decision label is 'monitor', consistent with the heavy preconditions: the attacker must control the mirror (compromised mirror/CDN, a network man-in-the-middle of an http:// mirror, or a maliciously set NVM_NODEJS_ORG_MIRROR), the victim must run nvm under bash or zsh (dash is not affected), and the victim must run a command that refreshes or resolves LTS aliases. Net: this is a genuine code-execution bug but a conditional, non-wormable one; it warrants patching on a normal cadence rather than emergency response. Note the missing EPSS data limits probabilistic exploitation estimates.

Exploit ScenarioDerived

An attacker who can man-in-the-middle an http:// Node.js mirror, compromise/poison the mirror or its CDN, or trick a victim into setting NVM_NODEJS_ORG_MIRROR serves an index.tab whose version column contains a crafted value such as lts/-10*path[$(cmd)1]. When the victim (on bash or zsh, nvm 0.39.6-0.40.8) runs nvm ls-remote, the value is stored unvalidated as an LTS alias; a later local command like nvm use --lts or nvm alias - or every new shell if the default alias is lts/* - resolves the alias and runs cmd as the user. The GHSA advisory ships demonstration test cases proving the injection.

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

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

Alert me

AnalysisAIv1 – Nov 04, 2026

Node Version Manager (nvm) 0.39.6 through 0.40.8 contains a command injection path in which the version column of a Node.js mirror's index.tab is stored unvalidated under $NVM_DIR/alias/lts/ and is later passed into shell arithmetic by nvm_normalize_lts, where bash and zsh expand command substitutions in array subscripts and execute attacker-supplied commands as the user. Exploitation requires the victim to obtain Node.js metadata through an attacker-controlled mirror (a compromised mirror or CDN, a network man-in-the-middle of an http:// mirror, or a maliciously set NVM_NODEJS_ORG_MIRROR) and then run a command that resolves the stored alias; unauthenticated remote attackers can do this, but user interaction is required, which is reflected in the low CVSS 4.0 base score of 2.1 despite high confidentiality and integrity impact in the independent assessment. A vendor-released patch exists in nvm 0.41.0; there is no CISA KEV confirmation of active exploitation, and no EPSS score was supplied, so priority is set to monitor. The advisory discloses the injection payload format in its regression tests, so a public PoC reference exists; it is not verified as working exploit code.

RemediationAI

Vendor-released patch: nvm v0.41.0, published in commit aa0572b7c48b2652a9f86276bbbf3840939981af (https://github.com/nvm-sh/nvm/commit/aa0572b7c48b2652a9f86276bbbf3840939981af), per advisory GHSA-7prg-rw9c-82h7 (https://github.com/nvm-sh/nvm/security/advisories/GHSA-7prg-rw9c-82h7). The fix tightens nvm_normalize_lts so that only an all-digit suffix reaches the $(( )) arithmetic context - any other value is returned unchanged - and hardens nvm_ls_remote_index_tab so rows whose version column does not match a valid vX.Y.Z (optionally prerelease-suffixed) pattern are dropped before being printed, stored as an LTS alias, or matched against a pattern. Upgrade all nvm installations in the 0.39.6-0.40.8 range to 0.41.0 or later; the advisory does not describe an alternative configuration-level workaround, so updating is the complete fix. Because the payload persists in $NVM_DIR/alias/lts/ after a hostile nvm ls-remote or nvm version-remote, environments that may already have been exposed should inspect the alias files under $NVM_DIR/alias/lts/ and reset them after upgrading, and mirror configuration should be reviewed so that only trusted mirrors are used. The advisory notes that dash rejects the crafted arithmetic value and is not affected, but shell selection is not presented by the vendor as a remediation step.

Affected VersionsENISA

nvm 0.39.6 <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 library that manages multiple Node.js versions, and it caches remote LTS alias data locally. In nvm_ls_remote_index_tab, the version column of the mirror's index.tab is written verbatim into $NVM_DIR/alias/lts/<codename> with no validity check - a store that has existed since v0.31.3. The arithmetic sink was introduced in v0.39.6 by commit 1f970ccb, which replaced an anchored digits-only expr regex in nvm_normalize_lts with a case glob lts/-[123456789][0123456789]* whose trailing * accepts any suffix; everything after the dash is then evaluated in N=$((N+1)). Under bash and zsh, arithmetic evaluation expands command substitutions inside array subscripts, so a stored value of the form lts/-10*path[$(cmd)1] executes cmd when the alias is resolved by local-only commands (nvm ls, nvm alias, nvm use --lts, nvm which lts/), and in every new shell if the default alias points at lts/*. dash rejects the value with "Illegal number" and is not affected. The root cause class is OS command injection (CWE-78), with the advisory also tagging CWE-20 for the missing input validation of untrusted mirror metadata that reaches a shell evaluator. This is a distinct sink from the download-path eval/awk issues in CVE-2026-10796 and CVE-2026-1665 and from the LTS codename path traversal in CVE-2026-15921. The same function is reachable from a project .nvmrc, which the vendor classifies as hardening rather than the primary vulnerability. The supplied CPE (cpe:2.3:a:nvm-sh:nvm:*:*:*:*:*:*:*:*) is unversioned, so the precise exposure window comes from the advisory's affected range rather than from CPE matching.

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 2.1 LOW
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
vuln.today AI 7.5 HIGH

Payload is delivered over the network but needs attacker-controlled mirror (AC:H) and the victim to run an nvm command (UI:R); command injection runs arbitrary code as the user, so C/I/A:H.

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

Primary rating from Vendor (harborist).

CVSS VectorVendor: harborist

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Active
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
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.39.6 through 0.40.8, nvm ls-remote (and other commands that refresh remote LTS aliases) store the version column of the mirror's index.tab in $NVM_DIR/alias/lts/ without validating it, and nvm_normalize_lts later evaluates any suffix of an lts/-N value inside shell arithmetic $((N+1)). Under bash and zsh, arithmetic evaluation expands command substitutions in array subscripts, so a stored value such as lts/-10*path[$(cmd)1] runs cmd as the user when the alias is later resolved by purely local commands (nvm ls, nvm alias, nvm use --lts, nvm which lts/), and in every new shell when the default alias is lts/*. Exploitation requires the victim to use a hostile mirror -- via a compromised mirror or CDN, a network man-in-the-middle of an http:// mirror, or a maliciously configured NVM_NODEJS_ORG_MIRROR -- and to run an affected command. The same sink is also reachable from a project .nvmrc, which is treated as hardening. dash is not affected. Version 0.41.0 only passes an all-digit lts/-N offset to arithmetic and drops index.tab rows whose version is not a valid version string.

Threat Intelligence Overview

EPSS Score
0.2%
Top 86% exploitable
Prevalence
High
hugely popular Node.js version manager on developer 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.2%
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
Open
Automatable· derived
No
Human Impact· derived
High

Priority Score

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

Attack Technique

OS command injection occurs when an application passes unsanitized user input directly into system shell commands.

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