{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "introduced": "0"
              },
              {
                "last_affected": "0.40.7"
              },
              {
                "fixed": "0.40.8"
              }
            ],
            "source": [
              "AFFECTED_FIELD",
              "DESCRIPTION"
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "a885b885fef16fac4bc544188fb25e9e37ae83e8"
            }
          ],
          "repo": "https://github.com/nvm-sh/nvm",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-8grh-q73j-ffrc"
  ],
  "database_specific": {
    "cna_assigner": "harborist",
    "cwe_ids": [
      "CWE-200",
      "CWE-22"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/94xxx/CVE-2026-94185.json"
  },
  "details": "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 \u003ctraversing-name\u003e` discloses every non-comment line of the target file. There is no integrity or availability impact, and no command execution on this path.",
  "id": "CVE-2026-94185",
  "modified": "2026-09-25T03:30:48.035810731Z",
  "published": "2026-09-21T02:27:00.752Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/94xxx/CVE-2026-94185.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/nvm-sh/nvm/security/advisories/GHSA-8grh-q73j-ffrc"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-94185"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/nvm-sh/nvm"
    }
  ],
  "schema_version": "1.9.0",
  "severity": [
    {
      "score": "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",
      "type": "CVSS_V4"
    }
  ],
  "summary": "nvm alias resolution follows `..` and discloses files outside $NVM_DIR/alias"
}