{"affected":[{"defaultStatus":"unaffected","product":"nvm","source":"CNA: harborist","vendor":"nvm-sh","versions":[{"lessThan":"0.41.0","status":"affected","version":"0.39.6","versionType":"semver"}]},{"ecosystem":"other","packageName":"nvm-sh/nvm","product":"nvm-sh/nvm","source":"GitHub GHSA-7prg-rw9c-82h7","vendor":"","versions":[{"status":"affected","version":">= 0.39.6, <= 0.40.8","versionType":"GitHub advisory range"}]}],"cveId":"CVE-2026-121751","cwes":["CWE-78","CWE-20"],"description":"Node Version Manager (nvm) is a POSIX-compliant shell function for managing multiple node.js versions. In versions 0.39.6 through 0.40.8, `nvm ls-remote` (and other commands that refresh remote LTS aliases) store the version column of the mirror's `index.tab` in `$NVM_DIR/alias/lts/` without validating it, and `nvm_normalize_lts` later evaluates any suffix of an `lts/-N` value inside shell arithmetic `$((N+1))`. Under bash and zsh, arithmetic evaluation expands command substitutions in array subscripts, so a stored value such as `lts/-10*path[$(cmd)1]` runs `cmd` as the user when the alias is later resolved by purely local commands (`nvm ls`, `nvm alias`, `nvm use --lts`, `nvm which lts/`), and in every new shell when the `default` alias is `lts/*`. Exploitation requires the victim to use a hostile mirror -- via a compromised mirror or CDN, a network man-in-the-middle of an `http://` mirror, or a maliciously configured `NVM_NODEJS_ORG_MIRROR` -- and to run an affected command. The same sink is also reachable from a project `.nvmrc`, which is treated as hardening. dash is not affected. Version 0.41.0 only passes an all-digit `lts/-N` offset to arithmetic and drops `index.tab` rows whose version is not a valid version string.","epss":{"date":"2026-11-09","percentile":0.14107,"score":0.00232},"exploits":[],"kev":null,"metrics":[{"score":2.1,"severity":"low","source":"CNA: harborist","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N","version":"4.0"},{"score":3.1,"severity":"low","source":"CNA: harborist","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N","version":"3.1"},{"score":2.1,"severity":"low","source":"NVD: 7ffcee3d-2c14-4c3e-b844-86c6a321a158","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:L/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","version":"4.0"},{"score":3.1,"severity":"low","source":"NVD: 7ffcee3d-2c14-4c3e-b844-86c6a321a158","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N","version":"3.1"}],"modifiedAt":1794257085880,"publishedAt":1793827617967,"references":[{"source":"CNA: harborist","tags":["vendor-advisory"],"url":"https://github.com/nvm-sh/nvm/security/advisories/GHSA-7prg-rw9c-82h7"},{"source":"CNA: harborist","tags":["patch"],"url":"https://github.com/nvm-sh/nvm/commit/aa0572b7c48b2652a9f86276bbbf3840939981af"},{"source":"7ffcee3d-2c14-4c3e-b844-86c6a321a158","tags":[],"url":"https://github.com/nvm-sh/nvm/commit/aa0572b7c48b2652a9f86276bbbf3840939981af"},{"source":"7ffcee3d-2c14-4c3e-b844-86c6a321a158","tags":[],"url":"https://github.com/nvm-sh/nvm/security/advisories/GHSA-7prg-rw9c-82h7"},{"source":"GitHub Security Advisories","tags":["advisory"],"url":"https://github.com/nvm-sh/nvm/security/advisories/GHSA-7prg-rw9c-82h7"}],"remediation":[{"kind":"fix","source":"CNA: harborist","text":"Upgrade to nvm 0.41.0 or later, which only lets an all-digit `lts/-N` offset reach shell arithmetic and drops mirror rows with invalid version strings. (Only needed if using a non-default mirror whose metadata contents you do not trust, or running nvm in untrusted project directories.)"},{"kind":"workaround","source":"CNA: harborist","text":"Until upgrading, only run `nvm ls-remote` and LTS-refreshing commands against trusted mirrors over TLS, ensure `NVM_NODEJS_ORG_MIRROR` points only at a trusted endpoint, and do not run nvm in untrusted project directories."},{"kind":"fix","source":"CNA: harborist","text":"The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches.","url":"https://github.com/nvm-sh/nvm/commit/aa0572b7c48b2652a9f86276bbbf3840939981af"},{"kind":"fix","source":"GitHub GHSA-7prg-rw9c-82h7","text":"nvm-sh/nvm (other): GitHub reports patched versions 0.41.0. Check the advisory for the affected release branch.","url":"https://github.com/nvm-sh/nvm/security/advisories/GHSA-7prg-rw9c-82h7"}],"revision":"3b906d3bf48bce2d74dca5f14a471ad6cb4d4758c5220c433100344b82d501e8","sources":[{"modifiedAt":1794257085880,"name":"CNA: harborist","retrievedAt":1794258558101,"url":"https://www.cve.org/CVERecord?id=CVE-2026-121751"},{"modifiedAt":1793830675060,"name":"NVD","retrievedAt":1793838299818,"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-121751"},{"modifiedAt":1793827604000,"name":"GitHub Security Advisories","retrievedAt":1793978409582,"url":"https://github.com/nvm-sh/nvm/security/advisories/GHSA-7prg-rw9c-82h7"},{"modifiedAt":null,"name":"FIRST EPSS","retrievedAt":1794258584125,"url":"https://api.first.org/data/v1/epss?cve=CVE-2026-121751"}],"ssvc":{"assessedAt":1794257070272,"automatable":"no","exploitation":"none","source":"ADP: CISA-ADP","technicalImpact":"partial"},"status":"published","title":"nvm evaluates a malicious mirror's index.tab version strings as shell arithmetic via stored LTS aliases","updatedAt":1794258584125}