Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessControl or MITM the Node.js mirror
-
DeliveryServe index.tab with crafted version string
-
Exploitnvm ls-remote stores it as LTS alias
-
ExecutionLocal nvm command evaluates it in shell arithmetic
-
ImpactCommand 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 |
| 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 |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
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 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
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
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.
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.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
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
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
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
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-117126
NVD
CVE.org
EPSS
GitHub
Exploit-DB