Read the docs
TI-2026-85227 Aliases CVE-2026-121747

nvm prints contents of arbitrary files through a symlinked .nvmrc

Priority LOW 29CWE-200Published · Updated

Key facts

Attack vector
Local
Privileges required
None
User interaction
Active
Attack complexity
Low
Attack requirements
None
Impact type
Information disclosure
Confidentiality · integrity · availability
High · None · None
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-200.

Summary

nvm from 0.2.0 before 0.41.0 does not check whether .nvmrc is a symbolic link (CWE-59). A repository or archive that links .nvmrc to another file makes commands such as nvm use or nvm install print that file's contents in their messages, even with --silent. An attacker must supply the repository and be able to see the victim's output, such as a CI log, to read the content.

Written with Claude Haiku 5.5 from the sources below · 2026-11-06

Description from the CNA

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.

Why it matters now

EPSS 0.0018 7th percentileScored 2026-11-07
Fix Fixed nvm (nvm-sh): 0.41.0

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
nvm-shnvm0.2.0 to before 0.41.00.41.0Patch availableCNA
  • nvm Vendornvm-sh Affected 0.2.0 to before 0.41.0 Fixed in 0.41.0 Patch available CNA

Remediation

Update nvm to 0.41.0, which still follows symlinked .nvmrc files but never prints their contents. Users of the README's bash cdnvm hook must also update their copy of it, because it now gets the version from nvm.

Written with Claude Haiku 5.5 from the sources below · 2026-11-06

  • Fix · CNA nvm (nvm-sh) Fixed in 0.41.0

Fixed in the same release

Records fixed by the same vendor advisory or release, as the CNA lists them.

  • Release ·

    nvm-sh nvm 0.41.0

    7 records Highest priority Priority LOW 7 LOW

    Other records, highest priority first

    • TI-2026-85226 nvm --save follows symlinked .nvmrc and overwrites filesPriority LOW 29
    • TI-2026-85228 nvm passes .nvmrc contents to grep, leaking local filesPriority LOW 20
    • TI-2026-85216 Command injection in nvm through malicious mirror LTS alias valuesPriority LOW 11

Vendor assessments

Red Hat

Red Hat's page for this CVE →

Not affected: 1 product
  • Red Hat

Timeline

  1. 2026-11-04 Threatist record created from CVE-2026-121747
  2. 2026-11-06 Priority changed: MEDIUM → LOW
  3. 2026-11-06 Affected versions changed · Red Hat
  4. 2026-11-06 CVSS score added · Red Hat

References

  • TI-2026-13337 nvm path traversal via a malicious mirror's LTS codename writes outside the alias directory CVSS 4.0LOW 2.1
  • TI-2026-82282 Command injection in nvm lets version strings run arbitrary commands CVSS 4.0HIGH 7.1
  • TI-2026-85226 nvm --save follows symlinked .nvmrc and overwrites files CVSS 4.0MEDIUM 6.7
  • TI-2026-63368 nvm alias resolution follows `..` and discloses files outside $NVM_DIR/alias CVSS 4.0MEDIUM 6.7
  • TI-2026-01349 Command Injection in nvm via NVM_AUTH_HEADER in wget code path CVSS 4.0MEDIUM 5.4
  • TI-2026-85228 nvm passes .nvmrc contents to grep, leaking local files CVSS 4.0MEDIUM 4.6
See all 10 →

Sources