# CVE-2026-94185: nvm alias resolution follows `..` and discloses files outside $NVM_DIR/alias

- Severity: Medium 6.7 (CVSS:4.0, scored by harborist) `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`
- 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.30%, higher than 24% of CVEs (2026-12-01)
- Published: 2026-09-21T02:27:00.752Z
- Modified: 2026-09-22T19:56:19.073Z
- Weaknesses: CWE-22, CWE-200
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: harborist

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

(As written by CVE List.)

## Affected

- nvm-sh nvm: up to 0.40.7 (not affected: 0.40.8)

## Every score

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

## References

- <https://github.com/nvm-sh/nvm/security/advisories/GHSA-8grh-q73j-ffrc> (vendor-advisory)

## Sources

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

---

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