Skip to main content

nvm CVE-2026-121747

| EUVDEUVD-2026-117173 MEDIUM
Improper Link Resolution Before File Access (CWE-59)
2026-11-04 harborist
6.7
CVSS 4.0 · Vendor: harborist
View

Attack ChainAIDerived

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

  1. Access
    Craft .nvmrc as symlink to secret file
  2. Delivery
    Deliver via contributed branch or archive
  3. Exploit
    Victim runs nvm (or cd's with hook)
  4. Execution
    nvm prints target file contents to output
  5. Impact
    Attacker reads secret from victim CI log

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Symlink resolution safety
Exploitation Conditions

Exploitation requires an attacker-controlled .nvmrc within a directory the victim operates in - delivered via a contributed git branch, a cloned repository, or an extracted archive - shipped specifically as a symbolic link pointing at a sensitive file the victim can read (the advisory names ../../.npmrc for an npm auth token, ~/.git-credentials, or /proc/self/environ on Linux). The victim must then run nvm use, install, which, exec, run, or nvm-exec in that directory, OR have the README's zsh load-nvmrc or bash cdnvm hook installed, in which case merely changing into the directory triggers the read. The key limiting factor is observability: nvm sends the file contents nowhere, so the attacker gains the secret only where they can see the victim's output (a CI log for a contributed branch, a shared terminal, or pasted output). It affects only nvm versions 0.2.0 through 0.40.8; v0.41.0 still follows deliberate symlinks but never prints their content and accepts only a version or existing alias name.

Impact

The vendor CVSS 4.0 score is 6.7 (medium) with vector AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N - a local, low-complexity, unauthenticated flaw that requires active user interaction and yields confidentiality impact only (no integrity or availability loss). No EPSS score was provided in the input, the CVE is not listed in CISA KEV, and no public exploit was supplied, so exploitation is not confirmed in the wild. The vuln.today decision label is 'this_month' (not act_now/emergency), which is consistent with a medium-severity, patch-in-due-course issue rather than a fire drill. Real-world risk is materially constrained by the mechanism: it is not remotely triggerable on its own - an attacker must get a malicious symlinked .nvmrc in front of the victim (e.g. a contributed branch, cloned repo, or extracted archive) AND be able to observe the victim's output (such as a CI log for a contributed branch). Where those conditions hold - notably open-source CI running untrusted contributions with npm/registry tokens or credentials in the environment - this is a genuine secret-disclosure risk worth prioritizing; outside that, it is a lower-urgency local information leak.

Exploit ScenarioDerived

An attacker opens a pull request (or ships a repository/archive) whose .nvmrc is a symbolic link to a sensitive readable file such as ../../.npmrc, ~/.git-credentials, or /proc/self/environ. When the victim or a CI pipeline runs nvm use/install/which/exec/run (or nvm-exec), or merely cd's into the directory with the README's zsh load-nvmrc or bash cdnvm hook installed, nvm reads the symlink target and prints its contents in an error or 'Found ... with version' message - even with --silent - into output the attacker can later read. No public exploit code was identified at time of analysis.

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

Information disclosure in Node Version Manager (nvm) versions 0.2.0 through 0.40.8 allows a repository or archive that ships .nvmrc as a symbolic link to make nvm read and echo the contents of any file the victim can read - such as ../../.npmrc containing an npm auth token, ~/.git-credentials, or /proc/self/environ on Linux. The victim must run nvm use, install, which, exec, run, or nvm-exec in the affected directory, or merely change into it if the README's zsh load-nvmrc or bash cdnvm hook is installed; the attacker only learns the secret where the victim's output is visible, for example a CI log for a contributed branch. The vendor rates this 6.7 (medium) and the flaw yields confidentiality impact only (no integrity or availability loss); no public exploit code was identified at time of analysis, and the issue is fixed in v0.41.0.

RemediationAI

Upgrade nvm to 0.41.0, which contains the fixes in commits 67268ebc (https://github.com/nvm-sh/nvm/commit/67268ebcb6e1a26ae3d71b3710d6333bb7358662) and c314f1cb (https://github.com/nvm-sh/nvm/commit/c314f1cbb3c301c587a4e4f96511d31f1134ffd1); the full advisory is at https://github.com/nvm-sh/nvm/security/advisories/GHSA-j6ch-mq5c-3h4x. Users of the README's bash cdnvm hook must also update their own copy of the hook, because the old hook read .nvmrc itself and would keep printing a symlinked file's content even after nvm is patched - the updated hook obtains the version from nvm instead. Until upgraded, exposure is limited to workflows where nvm processes an attacker-supplied .nvmrc, so avoid running nvm use, install, which, exec, run, or nvm-exec in directories from untrusted contributed branches, cloned repositories or extracted archives, and be aware that CI logs, shared terminals and pasted output are exactly where any leaked secret becomes visible to the attacker; note that the zsh load-nvmrc and bash cdnvm hooks trigger the read merely on entering such a directory. Writing through a symlinked .nvmrc with --save is tracked separately in GHSA-8qjx-8r8m-mpqh.

Affected VersionsENISA

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

nvm is a POSIX-compliant shell function rather than a compiled binary, and its .nvmrc handling is split across nvm_find_up / nvm_find_nvmrc, which locate the file, and nvm_process_nvmrc / nvm_process_nvmrc_content, which read and parse it. Root cause is CWE-59 (improper link resolution before file access), described by the vendor advisory alongside CWE-61 and CWE-200: nothing that reads .nvmrc checked whether it was a symbolic link, so the symlink target was read and, when the content did not parse as a valid .nvmrc, echoed whole in the invalid-.nvmrc message (even with --silent), or, for a one-line file, echoed in the Found '…' with version <…> message. This is the same outcome as GHSA-8grh-q73j-ffrc / CVE-2026-94185 but via a different mechanism - the symlink itself is the pointer, so the .. check previously added for alias names does not apply. The v0.41.0 fix keeps following deliberate symlinks (for example .nvmrc → .node-version or → ../../.nvmrc) but adds nvm_is_version_or_alias and suppresses the content of any symlinked .nvmrc, emitting instead "invalid .nvmrc! '…' is a symbolic link, so it must contain a version or an alias name; its content is not shown." Writing through a symlinked .nvmrc with --save is a separate, independently fixable issue tracked as GHSA-8qjx-8r8m-mpqh.

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 6.7 MEDIUM
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
vuln.today AI 5.5 MEDIUM

Local because the victim must run nvm against an attacker-planted file, user interaction is required to trigger the read, no privileges are needed to plant it, and impact is confidentiality-only limited to files the victim can already read.

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
4.0 AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/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
High
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.2.0 through 0.40.8, nvm does not check whether .nvmrc is a symbolic link. A repository or archive that ships .nvmrc as a symlink to another file (for example ../../.npmrc, or /proc/self/environ on Linux) makes a plain nvm use, nvm install, nvm which, nvm exec, nvm run, or nvm-exec read that file and print its contents in the invalid-.nvmrc message (even with --silent) or, for a one-line file, in the Found ... with version <...> message; with the README's zsh load-nvmrc or bash cdnvm hook installed, entering the directory is enough. nvm sends the content nowhere; the attacker learns it only where they can see the victim's output, such as a CI log for a contributed branch. Version 0.41.0 still follows a symlinked .nvmrc, so deliberate links to another version file keep working, but never prints its content, and accepts it only if it contains a version or the name of an existing alias; the README's bash cdnvm hook, which read .nvmrc itself, now gets the version from nvm, so users of that hook must also update their copy of it.

Threat Intelligence Overview

EPSS Score
0.2%
Top 92% exploitable
Prevalence
High
extremely popular Node.js version manager on developer and CI machines
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

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
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-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-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