# CVE-2026-121746: nvm use --save and nvm install --save write through a symlinked .nvmrc, overwriting any file the user can write

- Severity: Medium 6.7 (CVSS:4.0, scored by harborist) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.24%, higher than 15% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-11-04T21:31:57.022Z
- Modified: 2026-11-10T21:46:30.490Z
- Weaknesses: CWE-59
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: harborist

## 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.

(As written by CVE List.)

## Affected

- nvm-sh nvm: from 0.40.0 before 0.41.0

## Every score

- harborist: CVSS:4.0 6.7 Medium `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`
- harborist: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N`

## References

- <https://github.com/nvm-sh/nvm/security/advisories/GHSA-8qjx-8r8m-mpqh> (exploit, vendor-advisory)
- <https://github.com/nvm-sh/nvm/commit/3f8411e58d40b904e4ff6a96512391f56bd95bf7> (patch)

## Sources

- CVE List: [CVE-2026-121746](https://www.cve.org/CVERecord?id=CVE-2026-121746), CVE Terms of Use, modified 2026-11-09
- NVD: [CVE-2026-121746](https://nvd.nist.gov/vuln/detail/CVE-2026-121746), Public domain, modified 2026-11-10

---

Page: https://cve.day/CVE-2026-121746 · Whole record: https://cve.day/CVE-2026-121746.json · Rebuilt by cve.day 2026-11-25T22:59:49.048Z
