{"id":"CVE-2026-121746","aliases":["CVE-2026-121746"],"related":[],"kind":"vulnerability","state":"published","title":"nvm use --save and nvm install --save write through a symlinked .nvmrc, overwriting any file the user can write","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"}],"published":"2026-11-04T21:31:57.022Z","modified":"2026-11-10T21:46:30.490Z","severity":{"scorer":"harborist","scheme":"CVSS:4.0","vector":"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","score":6.7,"rating":"MEDIUM"},"severities":[{"scorer":"harborist","scheme":"CVSS:4.0","vector":"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","score":6.7,"rating":"MEDIUM"},{"scorer":"harborist","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-59"],"affected":[{"ranges":[{"type":"semver","introduced":"0.40.0","fixed":"0.41.0","status":"affected"}],"vendor":"nvm-sh","product":"nvm","repo":"https://github.com/nvm-sh/nvm","source":"cvelist"}],"references":[{"url":"https://github.com/nvm-sh/nvm/security/advisories/GHSA-8qjx-8r8m-mpqh","tags":["exploit","vendor-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/nvm-sh/nvm/commit/3f8411e58d40b904e4ff6a96512391f56bd95bf7","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":["Adel Assakaf (https://github.com/assakafpix)","Anthropic's OSS Scanner, as part of vulnerability ANT-2026-G9REVGKT","Jordan Harband (https://github.com/ljharb)"],"assigner":"harborist","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-11-09T20:42:00.793Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-121746","url":"https://www.cve.org/CVERecord?id=CVE-2026-121746","licence":"CVE Terms of Use","modified":"2026-11-09T20:42:28.385Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-121746","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-121746","licence":"Public domain","modified":"2026-11-10T21:46:30.490Z"}],"updatedAt":"2026-11-25T22:59:49.048Z","epss":{"score":0.00236,"percentile":0.15607,"date":"2026-12-01T12:00:22.000Z"}}