CVE-2026-121746 · Package
NO FIX YET · SEE WHAT TO DO
In nvm versions 0.40.0 through 0.40.8, running `nvm use --save` or `nvm install --save` writes the version through a symbolic link named .nvmrc, so a repository can point it at a file the user can write, such as a shell startup file or authorized_keys. That file gets truncated and overwritten with the version string, which is data loss rather than code execution.
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.
Developers who use nvm 0.40.0 through 0.40.8 and run nvm use --save or nvm install --save inside a repository whose committed .nvmrc is a symbolic link to a path outside the repository. Git recreates the link on clone, so the exposure comes from cloning untrusted code. Teams that do not use the --save flag, or that run nvm 0.41.0 or later, can skip it.
Not affected if nvm-0.41.0-or-later, save-flag-unused, trusted-repositories
Who cares developer-workstations, node, nvm, shell
nvm --version and check whether it is between 0.40.0 and 0.40.8..nvmrc in cloned repositories with ls -l .nvmrc; a symbolic link pointing outside the repository is the risky case.Node Version Manager (nvm) is a POSIX-compliant shell function for managing multiple node.js versions. In versions 0.40.0 through 0.40.8, nvm use --save and nvm install --save (or -w) write the resolved version to $PWD/.nvmrc with tee, which follows a symbolic link. A repository that commits .nvmrc as a symlink to a path outside itself (git recreates the link on clone) therefore makes --save truncate any file the user can write, such as a shell startup file or ~/.ssh/authorized_keys, and replace its contents with the version string, or create the target of a dangling link; the link itself is left unchanged, so git status stays clean. The attacker does not control the content written, so this is data loss, not code execution. Version 0.41.0 refuses, with a warning, to write when .nvmrc in the current directory is a symlink, dangling or not, rather than writing through it or replacing it.
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.
0.41.0.nvmrcThis page as .md · .json · CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/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.