CVE-2026-121749 · Runtime
NO FIX YET · SEE WHAT TO DO
Node Version Manager (nvm) passes the version string from a .nvmrc file to grep without guarding against leading dashes, so a first line beginning with '-' is read as grep options. A repository containing a symlink such as one to ../../.npmrc can then get part of the user's npm token printed to the terminal and sent in download URLs to the mirror.
first public Nov 4, 2026 · 1 source
Check it with your coding agent
It checks your repository and tells you if you’re affected, with the fix.
Anyone who runs a bare nvm install inside a repository they did not write or fully trust, using nvm between 0.5.0 and 0.40.8. The exposure needs a .nvmrc whose first line starts with a dash plus a symlink pointing at a credentials file, and the disclosure is limited to the characters 0-9A-Za-z._+- . Teams that only use explicit version numbers, or who run a patched nvm, can skip it.
Not affected if explicit-version-install, no-untrusted-repos, nvm-0.41.0-or-later
Who cares developers, node.js, npm, nvm
nvm --version or by reading the installed nvm script; versions 0.5.0 through 0.40.8 are affected.nvm install in for a .nvmrc whose first line starts with -.0.41.0 or later, which passes every version pattern to grep with .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 .
Are you affected?
Tell InfraStack what you run. It checks this one, and every next one, against your stack.
Ask from here. InfraStack checks the affected versions against your stack and answers in your inbox.
InfraStack checks the affected versions against your stack and answers in Slack, with the evidence and the fix.
-e-eThis page as .md · .json · 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
NVD data is provided by NIST and is public domain. Posts quoted belong to their authors.