Skip to main content

nvm CVE-2026-121749

| EUVDEUVD-2026-117174 MEDIUM
Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') (CWE-88)
2026-11-04 harborist
4.6
CVSS 4.0 · Vendor: harborist
View

Attack ChainAIDerived

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

  1. Access
    Craft malicious .nvmrc starting with dash
  2. Delivery
    Victim checks out repo, runs bare nvm install
  3. Exploit
    grep parses pattern as -R options
  4. Execution
    Recursively read local files via symlink
  5. Impact
    npm 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 nvm install (no version argument) so nvm reads .nvmrc; the command being run inside an attacker-controlled directory/repository whose .nvmrc first line begins with - (e.g. -Rohenpm_[A-Za-z0-9]*); a system using GNU grep, whose -R triggers the recursive directory search (BSD/BusyBox grep untested per the advisory); and the attacker being able to read nvm's output (such as a CI job log) to recover the disclosed value. The technique works even with --offline or an unreachable mirror because the version list is never consulted. Limiting factors: victim interaction is mandatory (UI:A), the attack is local/file-driven (AV:L), the disclosure is read-only and restricted to the characters 0-9A-Za-z._+-, and it depends on GNU-grep behavior - so it is not remotely exploitable against a running service and is most dangerous in CI/automation that checks out untrusted repositories.

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 nvm install), and impact limited to VC:L with no integrity or availability effect. No EPSS probability was provided in the input, so likelihood of mass exploitation cannot be quantified from the data. It is not in CISA KEV and no separately cataloged exploit is listed; the vuln.today decision label is 'this_month', i.e. a scheduled-remediation priority, not act_now/emergency. The practical risk concentrates in CI/CD and shared-build contexts: an attacker who can publish a repository that a pipeline checks out and runs nvm install in (on a host using GNU grep) can cause nvm to recursively read local files and surface a secret such as an npm token into logs the attacker can read. The disclosure is read-only and limited to the characters 0-9A-Za-z._+-, which bounds its severity, but leaked npm tokens are high-value, so the low CVSS score understates impact in secret-bearing automation while overstating it on single-user developer machines where the attacker cannot read the output.

Exploit ScenarioDerived

An attacker publishes a repository containing a .nvmrc whose first line is -Rohenpm_[A-Za-z0-9]* plus a symlink pointing at ../../.npmrc. When a victim (for example a CI runner or developer) checks it out and runs a bare nvm install on a system with GNU grep, nvm passes the pattern to grep without -e, so grep interprets -R and recursively searches the working directory, follows the symlink, and the matched npm token is printed and embedded in mirror download URLs. No standalone weaponized exploit is cataloged, but the GHSA advisory and the committed regression test together provide a complete, reproducible technique.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.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

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

nvm 0.5.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

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

Vendor (harborist) PRIMARY 4.6 MEDIUM
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
vuln.today AI 3.3 LOW

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.

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

Primary rating from Vendor (harborist).

CVSS VectorVendor: harborist

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Active
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
None
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.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

EPSS Score
0.2%
Top 95% exploitable
Prevalence
High
very widely used Node.js developer and CI tooling, not production servers
Social Media
1
Sightings
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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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

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

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

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

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