Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malicious .nvmrc starting with dash
-
DeliveryVictim checks out repo, runs bare nvm install
-
Exploitgrep parses pattern as -R options
-
ExecutionRecursively read local files via symlink
-
Impactnpm token leaked to terminal and mirror logs
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Argument sanitization
|
| Exploitation Conditions | Exploitation requires all of: nvm version 0.5.0-0.40.8; the victim running a bare |
| Impact | This is a moderate-severity, low-impact information-disclosure flaw (CWE-88 argument injection) rather than a top-tier emergency. The vendor-supplied CVSS 4.0 base score is 4.6 (medium) with AV:L (the attacker must get the victim to operate inside an attacker-controlled directory), AC:L, AT:N, PR:N (the attacker needs no account on the victim system - they only author a repository), UI:A/Active (the victim must run a bare |
| Exploit ScenarioDerived | An attacker publishes a repository containing a |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 04, 2026
Argument injection in Node Version Manager (nvm) 0.5.0 through 0.40.8 lets a malicious .nvmrc smuggle grep options and disclose local file contents - for example an npm auth token - when a developer or CI job runs a bare nvm install inside an untrusted repository. The version pattern reaches grep as a bare argument rather than after -e, so a first line beginning with - (such as -Rohenpm_[A-Za-z0-9]*) enables GNU grep's recursive -R search, and nvm then treats the matched text as a resolved version, prints it, and places it in the download URLs requested from the configured mirror. Disclosure is read-only and limited to the characters 0-9A-Za-z._+-, requires user interaction plus the ability to read nvm's output (a CI log, for instance), and is fixed in 0.41.0, whose commit includes a regression test that reproduces the npm-token leak; no KEV listing or independently confirmed working exploit code is in the provided data.
RemediationAI
Upgrade nvm to 0.41.0, the vendor-released fix in commit bce663e3 (https://github.com/nvm-sh/nvm/commit/bce663e3873fadbe8ebbc6e07e8d76fb12d5d69e), which passes every version pattern to grep with -e; the advisory is at https://github.com/nvm-sh/nvm/security/advisories/GHSA-xmxw-6r9w-89gc. Per the advisory the trigger is a bare nvm install reading .nvmrc inside a directory the attacker controls, so until hosts and CI images are upgraded, avoiding argument-less nvm install (supplying an explicit version, or running the build outside untrusted checkouts) removes the .nvmrc-driven path described, at the cost of not honoring repository-pinned versions. Note that the same pattern handling is reachable through mirror-supplied version strings for implicit aliases, so upgrading remains the complete fix, and that token exposure occurs through the mirror and proxy logs as well as the terminal, meaning any credentials present in a checkout during a successful exploit should be rotated.
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
CWE-88 (improper neutralization of argument delimiters) in a POSIX shell function: nvm builds grep invocations in nvm_ls_remote_index_tab, in the post-check of nvm_remote_version, and in nvm_ls_cached where the requested version pattern is supplied as a bare positional argument. Because the pattern is not preceded by -e, a leading dash makes grep interpret it as options; the advisory's example -Rohenpm_[A-Za-z0-9]* decomposes to -R -o -h -e 'npm_…'. With GNU grep, -R plus no file operand discards the version list on stdin and instead walks the current directory recursively, following symlinks, so a checked-out repository containing a symlink such as ../../.npmrc yields matching token text. nvm takes that match as the version, echoes it, and embeds it in mirror download URLs, exposing it to the terminal, the mirror's logs and any intermediary proxy logs; because the version list is never read, this also works with --offline or an unreachable mirror. The same input path exists for implicit aliases such as node and stable, where the pattern derives from the version column of a mirror-supplied index.tab, and the fix commit's test covers that case too. The advisory notes the behavior was observed with GNU grep; BSD and BusyBox grep were not tested. The flawed .nvmrc read path for bare nvm install dates to commit bf8abf10 (v0.5.0).
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:N/PR:N/UI:A/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
The attacker only authors a repository file read locally when the victim runs bare `nvm install` (AV:L, UI:R) and needs no privileges on the host (PR:N), producing read-only low confidentiality impact with no integrity or availability effect.
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.5.0 through 0.40.8, the requested version pattern is passed to grep as a bare argument, without -e, in nvm_ls_remote_index_tab, nvm_remote_version, and nvm_ls_cached. A .nvmrc whose first line starts with -, such as -Rohenpm_[A-Za-z0-9]*, is parsed as grep options; with GNU grep, -R searches the current directory recursively (following symlinks) instead of the version list. On a bare nvm install, nvm then treats a matched string from those files as the version, prints it, and requests it from the configured mirror inside download URLs, so for example a repository containing a symlink to ../../.npmrc can leak the user's npm token to the terminal and to the mirror's and any proxy's logs. The disclosure is read-only and limited to the characters 0-9A-Za-z._+-. Version 0.41.0 passes every version pattern to grep with -e.
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
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
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
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
File corruption and permission weakening in Node Version Manager (nvm) 0.27.0 through 0.40.8 arise when a project `.npmr
EUVD-2026-117174
NVD
CVE.org
EPSS
GitHub
Exploit-DB