{"id":"CVE-2026-94185","state":"PUBLISHED","title":"nvm alias resolution follows `..` and discloses files outside $NVM_DIR/alias","description":"nvm resolves a requested version or alias by treating it as a filename under $NVM_DIR/alias. Before 0.40.8, nvm_alias() concatenated the requested name onto that directory and read the result with no containment check, so a name containing a `..` component escaped the alias directory; under the default layout an alias such as `../../.npmrc` resolves to a file in the user's home directory. nvm_print_alias_file() then emits every non-comment, non-empty line of whatever was opened. A version string taken from an untrusted .nvmrc reaches this path, so a developer who runs `nvm use`, `nvm install`, or `nvm which` inside an attacker-supplied repository discloses the first non-comment line of an arbitrary file readable by that user, in the resulting \"is not yet installed\" error message. A user-supplied `nvm alias <traversing-name>` discloses every non-comment line of the target file. There is no integrity or availability impact, and no command execution on this path.","publishedAt":"2026-09-21T02:27:00.752Z","updatedAt":"2026-09-21T19:40:26.517Z","severity":{"score":6.7,"label":"Medium","version":"4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","source":"harborist"},"assigner":"harborist","products":["nvm-sh nvm"],"affected":[{"vendor":"nvm-sh","product":"nvm","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThanOrEqual":"0.40.7","versionType":"semver"},{"version":"0.40.8","status":"unaffected","versionType":"semver"}],"collectionURL":"https://github.com/nvm-sh/nvm"}],"references":["https://github.com/nvm-sh/nvm/security/advisories/GHSA-8grh-q73j-ffrc"],"weaknesses":["CWE-22","CWE-200"],"ingestedAt":"2026-10-29T20:13:34.582Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/94xxx/CVE-2026-94185.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-94185","state":"PUBLISHED","datePublished":"2026-09-21T02:27:00.752Z","dateUpdated":"2026-09-21T19:40:26.517Z","assignerShortName":"harborist","assignerOrgId":"7ffcee3d-2c14-4c3e-b844-86c6a321a158","dateReserved":"2026-09-21T02:14:56.481Z"},"containers":{"cna":{"title":"nvm alias resolution follows `..` and discloses files outside $NVM_DIR/alias","descriptions":[{"lang":"en","value":"nvm resolves a requested version or alias by treating it as a filename under $NVM_DIR/alias. Before 0.40.8, nvm_alias() concatenated the requested name onto that directory and read the result with no containment check, so a name containing a `..` component escaped the alias directory; under the default layout an alias such as `../../.npmrc` resolves to a file in the user's home directory. nvm_print_alias_file() then emits every non-comment, non-empty line of whatever was opened. A version string taken from an untrusted .nvmrc reaches this path, so a developer who runs `nvm use`, `nvm install`, or `nvm which` inside an attacker-supplied repository discloses the first non-comment line of an arbitrary file readable by that user, in the resulting \"is not yet installed\" error message. A user-supplied `nvm alias <traversing-name>` discloses every non-comment line of the target file. There is no integrity or availability impact, and no command execution on this path."}],"affected":[{"vendor":"nvm-sh","product":"nvm","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThanOrEqual":"0.40.7","versionType":"semver"},{"version":"0.40.8","status":"unaffected","versionType":"semver"}],"collectionURL":"https://github.com/nvm-sh/nvm"}],"references":[{"url":"https://github.com/nvm-sh/nvm/security/advisories/GHSA-8grh-q73j-ffrc","name":"GHSA-8grh-q73j-ffrc","tags":["vendor-advisory"]}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV3_1":{"version":"3.1","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"NONE","availabilityImpact":"NONE","baseSeverity":"MEDIUM","baseScore":5.5,"vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N"}},{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV4_0":{"attackVector":"LOCAL","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"NONE","userInteraction":"ACTIVE","vulnConfidentialityImpact":"HIGH","subConfidentialityImpact":"NONE","vulnIntegrityImpact":"NONE","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:H/VI:N/VA:N/SC:N/SI:N/SA:N"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-22","lang":"en","description":"CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-200","lang":"en","description":"CWE-200 Exposure of Sensitive Information to an Unauthorized Actor","type":"CWE"}]}],"providerMetadata":{"shortName":"harborist","orgId":"7ffcee3d-2c14-4c3e-b844-86c6a321a158","dateUpdated":"2026-09-21T02:27:00.752Z"},"solutions":[{"lang":"en","value":"Upgrade to nvm 0.40.8 or later, which rejects any `..` path component in nvm_alias() and nvm_version_path().","supportingMedia":[{"type":"text/html","base64":false,"value":"<p>Upgrade to nvm 0.40.8 or later, which rejects any `..` path component in nvm_alias() and nvm_version_path().</p>"}]}],"credits":[{"lang":"en","value":"vnth4nhnt of CyStack","type":"finder"},{"lang":"en","value":"SecFathy","type":"finder"}]},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2026-94185","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2026-09-21T14:45:08.529950Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-09-21T19:40:26.517Z"}}]}}}