{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2026-121746", "assignerOrgId": "7ffcee3d-2c14-4c3e-b844-86c6a321a158", "state": "PUBLISHED", "assignerShortName": "harborist", "dateReserved": "2026-11-03T23:38:59.223Z", "datePublished": "2026-11-04T21:31:57.022Z", "dateUpdated": "2026-11-09T20:42:28.385Z" }, "containers": { "cna": { "providerMetadata": { "orgId": "7ffcee3d-2c14-4c3e-b844-86c6a321a158", "shortName": "harborist", "dateUpdated": "2026-11-04T21:31:57.022Z" }, "title": "nvm use --save and nvm install --save write through a symlinked .nvmrc, overwriting any file the user can write", "problemTypes": [ { "descriptions": [ { "lang": "en", "cweId": "CWE-59", "description": "CWE-59 Improper Link Resolution Before File Access ('Link Following')", "type": "CWE" } ] } ], "affected": [ { "vendor": "nvm-sh", "product": "nvm", "repo": "https://github.com/nvm-sh/nvm", "versions": [ { "status": "affected", "version": "0.40.0", "lessThan": "0.41.0", "versionType": "semver" } ], "defaultStatus": "unaffected" } ], "descriptions": [ { "lang": "en", "value": "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.", "supportingMedia": [ { "type": "text/html", "base64": false, "value": "
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.
" } ] } ], "references": [ { "url": "https://github.com/nvm-sh/nvm/security/advisories/GHSA-8qjx-8r8m-mpqh", "name": "GHSA-8qjx-8r8m-mpqh", "tags": [ "vendor-advisory" ] }, { "url": "https://github.com/nvm-sh/nvm/commit/3f8411e58d40b904e4ff6a96512391f56bd95bf7", "name": "Fix commit 3f8411e5", "tags": [ "patch" ] } ], "metrics": [ { "format": "CVSS", "scenarios": [ { "lang": "en", "value": "GENERAL" } ], "cvssV4_0": { "attackVector": "LOCAL", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "NONE", "userInteraction": "ACTIVE", "vulnConfidentialityImpact": "NONE", "subConfidentialityImpact": "NONE", "vulnIntegrityImpact": "HIGH", "subIntegrityImpact": "NONE", "vulnAvailabilityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED", "version": "4.0", "baseSeverity": "MEDIUM", "baseScore": 6.7, "vectorString": "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" } }, { "format": "CVSS", "scenarios": [ { "lang": "en", "value": "GENERAL" } ], "cvssV3_1": { "version": "3.1", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "HIGH", "availabilityImpact": "NONE", "baseSeverity": "MEDIUM", "baseScore": 5.5, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N" } } ], "workarounds": [ { "lang": "en", "value": "Until upgrading, check that `.nvmrc` is not a symlink (`ls -l .nvmrc`) before running `nvm use --save` or `nvm install --save` in an untrusted project directory.", "supportingMedia": [ { "type": "text/html", "base64": false, "value": "Until upgrading, check that `.nvmrc` is not a symlink (`ls -l .nvmrc`) before running `nvm use --save` or `nvm install --save` in an untrusted project directory.
" } ] } ], "solutions": [ { "lang": "en", "value": "Upgrade to nvm 0.41.0 or later.", "supportingMedia": [ { "type": "text/html", "base64": false, "value": "Upgrade to nvm 0.41.0 or later.
" } ] } ], "credits": [ { "lang": "en", "value": "Adel Assakaf (https://github.com/assakafpix)", "type": "finder" }, { "lang": "en", "value": "Anthropic's OSS Scanner, as part of vulnerability ANT-2026-G9REVGKT", "type": "finder" }, { "lang": "en", "value": "Jordan Harband (https://github.com/ljharb)", "type": "remediation developer" } ], "source": { "advisory": "GHSA-8qjx-8r8m-mpqh", "discovery": "EXTERNAL" } }, "adp": [ { "references": [ { "url": "https://github.com/nvm-sh/nvm/security/advisories/GHSA-8qjx-8r8m-mpqh", "tags": [ "exploit" ] } ], "metrics": [ { "other": { "type": "ssvc", "content": { "timestamp": "2026-11-09T20:42:00.793023Z", "id": "CVE-2026-121746", "options": [ { "Exploitation": "poc" }, { "Automatable": "no" }, { "Technical Impact": "partial" } ], "role": "CISA Coordinator", "version": "2.0.3" } } } ], "title": "CISA ADP Vulnrichment", "providerMetadata": { "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "shortName": "CISA-ADP", "dateUpdated": "2026-11-09T20:42:28.385Z" } } ] } }