nvm use --save and nvm install --save write through a symlinked .nvmrc, overwriting any file the user can write
Written by anthropic/claude-haiku-5.5 from the sources below. Verify against them.
- Exploited
- No known exploitation
- Fix
- Fixed in 0.41.0
- Who is exposed
- Not reported
Do first: Upgrade to a fixed version: 0.41.0.
- Exploitation?/40Exploitation: unknown (data gap). No CISA SSVC exploitation rating yet
- Exposure?/25Exposure: unknown (data gap). No advisory context yet
- Reach?/20Reach: unknown (data gap). No tracked technology or package matched
- Severity6.7/10CVSS 6.7
- No patch0/5No signal
What would change the score
- Would score about 62 if added to CISA KEV
- Would score about 57 if CISA's SSVC rates exploitation active
- Would score about 29 if advisories confirm default setups are exposed
CVE-2026-121746 is not in CISA's Known Exploited Vulnerabilities (KEV) catalog. No public exploit code is tracked. It is rated CVSS 6.7 (medium) and affects nvm; fixed in 0.41.0.
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- Published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- A 0-100 score for how much a CVE matters across the industry: exploitation, exposure, how widely the software is used, severity and whether a fix exists.What do these mean? →
- 7/100 · provisional
- Fix
- Fixed in 0.41.0
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
Node Version Manager (nvm) versions 0.40.0 through 0.40.8 can be tricked into overwriting a file the user can write when running `nvm use --save` or `nvm install --save` in a repository whose `.nvmrc` is a symbolic link to another path. This is reached locally, and it requires the user to run the command in that repository; the attacker can then destroy the contents of that target file, such as a shell startup file, but cannot control what is written or run code.
Read the original description
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.
What to do
Upgrade to a fixed version: 0.41.0.
Timeline
- CVE published
- First seen by cve.now
Affected versions
- nvm-sh nvm
From 0.40.0 · fixed in 0.41.0
Evidence 2
- Advisory
- Patch
Corrections
None so far.
Something wrong on this page? Report an error. Every fix is listed here.
Questions about CVE-2026-121746
Is CVE-2026-121746 being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data
Which versions are affected by CVE-2026-121746?
nvm: from 0.40.0 before 0.41.0.Source: cve.now feed data
How do I fix CVE-2026-121746?
Upgrade to a fixed version: 0.41.0.Source: cve.now feed data