Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessControl or MitM non-default mirror
-
DeliveryServe index.tab with crafted version string
-
ExploitUser runs nvm install/ls-remote
-
ExecutionVersion interpolated into eval curl/awk sink
-
PersistShell or awk system() executes payload
-
ImpactArbitrary commands run as nvm 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 | Victim must run nvm (e.g., |
| Impact | The CVSS 3.1 vector AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H is consistent with the description: network-reachable mirror, no auth on the mirror side, but high attack complexity and required user interaction because the victim must invoke |
| Exploit ScenarioDerived | A developer or CI job is configured (via NVM_NODEJS_ORG_MIRROR or an HTTP-only proxy) to fetch Node.js versions from an attacker-controlled or MitM-able mirror; the mirror serves an |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 04, 2026
Command injection in nvm (Node Version Manager) versions through 0.40.4 allows attackers controlling the configured Node.js/io.js mirror to execute arbitrary shell commands as the user running nvm. Mirror-supplied version strings flow unsanitized into an eval'd curl/wget invocation in nvm_download() and into an awk program in nvm_get_checksum(), enabling injection via constructs like $(id). No public exploit is identified at time of analysis, but the GitHub Security Advisory (GHSA-3c52-35h2-gfmm) and committed regression tests demonstrate the bug class, and CVSS 7.5 (AV:N/AC:H/PR:N/UI:R) reflects that the default TLS-protected nodejs.org mirror is unaffected.
RemediationAI
Upstream fix available (commits 6d870d182cd5333647ffa16c0d7dbcd817ec27a8, 90bb88748ba6c29c2cec73b18ed7057413aef308, and 70fb4ede6b9731d75d86451d48caa5faffbec21c on master); a released patched version is not independently confirmed at time of analysis, so users should track the next tagged release after 0.40.4 from https://github.com/nvm-sh/nvm/security/advisories/GHSA-3c52-35h2-gfmm or build from master. Until a tagged release is available, unset any custom NVM_NODEJS_ORG_MIRROR/NVM_IOJS_ORG_MIRROR configuration and rely on the default https://nodejs.org mirror - the trade-off is loss of internal-mirror caching and any air-gapped workflows. If a custom mirror is mandatory, enforce HTTPS to the mirror to remove the MitM vector and restrict the mirror to a trusted, integrity-checked source, accepting that a compromised mirror operator can still inject commands until the patch is applied. Do not run nvm install, nvm ls-remote, or related commands against untrusted mirror URLs.
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 installer/version-manager for Node.js distributed as nvm.sh. The vulnerability is CWE-78 (OS Command Injection) arising from two sinks that share the same untrusted input - version identifiers parsed from a mirror's index.tab. In nvm_download(), arguments were concatenated into a string and executed with eval curl … / eval wget $ARGS, so any shell metacharacter or $(…) in a download URL derived from the version was re-parsed by the shell. In nvm_get_checksum(), the version-derived slug was interpolated directly into an awk program, where awk's system() call could be reached by a crafted version. The affected CPE is cpe:2.3:a:nvm-sh:nvm:* up to 0.40.4.
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:H/VI:H/VA:H/SC:N/SI:N/SA:N
Primary rating from Vendor (openjs) · only source for this CVE.
CVSS VectorVendor: openjs
DescriptionCVE.org
nvm (Node Version Manager) through 0.40.4 executes arbitrary commands from version strings supplied by the configured Node.js/io.js mirror. Commands such as nvm install read the available versions from the mirror's index.tab and use the selected version, without sanitization, to build download URLs and shell/awk commands. Two sinks are affected by the same untrusted input: nvm_download() built a curl/wget command string and ran it with eval, so a version field containing command substitution (for example $(id)) was executed by the local shell; and nvm_get_checksum() interpolated the version-derived download slug into an awk program, so a crafted version could execute arbitrary commands via awk's system(). An attacker who controls the configured mirror, supplies mirror content to a user or CI on a non-default mirror, or machine-in-the-middles a non-TLS mirror can ∴ run arbitrary commands with the privileges of the user running nvm. The default mirror (https://nodejs.org over TLS) is not affected. Fixed on master (pending the next tagged release) by passing every argument as a literal argv element instead of using eval, by passing the value to awk as data via -v instead of interpolating it into the program, and by rejecting any version outside the Node.js/io.js version grammar before it is used.
Executive ViewAI
nvm (Node Version Manager) through version 0.40.4 contains a remote code execution vulnerability in development and CI/CD environments that use non-default Node.js mirrors. Attackers controlling a configured mirror can execute arbitrary commands with the privileges of the nvm user, potentially compromising source code, build artifacts, and deployment infrastructure. Organizations must prioritize patching to mitigate supply chain and development environment risks.
Apply vendor patch.
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.
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
Path traversal in nvm versions 0.32.1 through 0.40.5 allows a hostile Node.js mirror to overwrite arbitrary files in the
EUVD-2026-34303
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB