← Back to CVE Explorer

CVE-2026-15921

Full vulnerability record from the local CVENow database.

Description

Node Version Manager (nvm) is a POSIX-compliant shell function for managing multiple node.js versions. In versions 0.32.1 through 0.40.5, `nvm ls-remote` (and other commands that refresh remote LTS aliases, such as `nvm install --lts`) parse the node.js mirror's `index.tab` and use each release's LTS codename field as an alias filename without validating it. A malicious, compromised, or man-in-the-middled mirror can return an LTS codename containing path-traversal sequences such as `../../../.bashrc`, causing nvm to write the associated version string to a path outside `$NVM_DIR/alias`. With the default layout (`$NVM_DIR` is `~/.nvm`), this can create or overwrite files in the user's home directory, including shell startup files, which can lead to code execution in a later shell session. Exploitation requires the victim to use a hostile mirror -- via a compromised mirror or CDN, a network man-in-the-middle, or a maliciously configured `NVM_NODEJS_ORG_MIRROR`/`NVM_IOJS_ORG_MIRROR` -- and to run an affected command. Version 0.40.6 validates remote LTS codenames as safe alias filenames and rejects `..` path components when writing alias files.

Severity
LOW
CVSS score
2.1 (v4.0)
Vulnerability status
Awaiting Analysis
Source identifier
7ffcee3d-2c14-4c3e-b844-86c6a321a158
Published
2026-07-15 22:16:45.717000
Last modified
2026-10-24 21:10:00.130000
View original CVE JSON
{
  "id": "CVE-2026-15921",
  "sourceIdentifier": "7ffcee3d-2c14-4c3e-b844-86c6a321a158",
  "published": "2026-07-15T22:16:45.717",
  "lastModified": "2026-10-24T21:10:00.130",
  "vulnStatus": "Awaiting Analysis",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "Node Version Manager (nvm) is a POSIX-compliant shell function for managing multiple node.js versions. In versions 0.32.1 through 0.40.5, `nvm ls-remote` (and other commands that refresh remote LTS aliases, such as `nvm install --lts`) parse the node.js mirror's `index.tab` and use each release's LTS codename field as an alias filename without validating it. A malicious, compromised, or man-in-the-middled mirror can return an LTS codename containing path-traversal sequences such as `../../../.bashrc`, causing nvm to write the associated version string to a path outside `$NVM_DIR/alias`. With the default layout (`$NVM_DIR` is `~/.nvm`), this can create or overwrite files in the user's home directory, including shell startup files, which can lead to code execution in a later shell session. Exploitation requires the victim to use a hostile mirror -- via a compromised mirror or CDN, a network man-in-the-middle, or a maliciously configured `NVM_NODEJS_ORG_MIRROR`/`NVM_IOJS_ORG_MIRROR` -- and to run an affected command. Version 0.40.6 validates remote LTS codenames as safe alias filenames and rejects `..` path components when writing alias files."
    },
    {
      "lang": "es",
      "value": "Node Version Manager (nvm) es una función de shell compatible con POSIX para gestionar múltiples versiones de node.js. En las versiones 0.32.1 a 0.40.5, ’nvm ls-remote’ (y otros comandos que actualizan alias LTS remotos, como ’nvm install --lts’) analizan el ’index.tab’ del mirror de node.js y usan el campo de nombre en clave LTS de cada lanzamiento como un nombre de archivo de alias sin validarlo. Un mirror malicioso, comprometido o con un ataque de man-in-the-middle puede devolver un nombre en clave LTS que contenga secuencias de path-traversal como ’.. / .. / .. / .bashrc’, haciendo que nvm escriba la cadena de versión asociada a una ruta fuera de ’$NVM_DIR/alias’. Con la configuración predeterminada (’$NVM_DIR’ es ’~/.nvm’), esto puede crear o sobrescribir archivos en el directorio de inicio del usuario, incluidos los archivos de inicio de shell, lo que puede llevar a la ejecución de código en una sesión de shell posterior. La explotación requiere que la víctima use un mirror hostil -- a través de un mirror o CDN comprometido, un man-in-the-middle de red, o un ’NVM_NODEJS_ORG_MIRROR’/’NVM_IOJS_ORG_MIRROR’ configurado maliciosamente -- y que ejecute un comando afectado. La versión 0.40.6 valida los nombres en clave LTS remotos como nombres de archivo de alias seguros y rechaza los componentes de ruta ’..’ al escribir archivos de alias."
    }
  ],
  "affected": [
    {
      "source": "7ffcee3d-2c14-4c3e-b844-86c6a321a158",
      "affectedData": [
        {
          "vendor": "nvm-sh",
          "product": "nvm",
          "defaultStatus": "unaffected",
          "repo": "https://github.com/nvm-sh/nvm",
          "versions": [
            {
              "version": "0.32.1",
              "lessThan": "0.40.6",
              "versionType": "semver",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV40": [
      {
        "source": "7ffcee3d-2c14-4c3e-b844-86c6a321a158",
        "type": "Secondary",
        "cvssData": {
          "version": "4.0",
          "vectorString": "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",
          "baseScore": 2.1,
          "baseSeverity": "LOW",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "attackRequirements": "PRESENT",
          "privilegesRequired": "NONE",
          "userInteraction": "ACTIVE",
          "vulnConfidentialityImpact": "NONE",
          "vulnIntegrityImpact": "LOW",
          "vulnAvailabilityImpact": "NONE",
          "subConfidentialityImpact": "NONE",
          "subIntegrityImpact": "NONE",
          "subAvailabilityImpact": "NONE",
          "exploitMaturity": "NOT_DEFINED",
          "confidentialityRequirement": "NOT_DEFINED",
          "integrityRequirement": "NOT_DEFINED",
          "availabilityRequirement": "NOT_DEFINED",
          "modifiedAttackVector": "NOT_DEFINED",
          "modifiedAttackComplexity": "NOT_DEFINED",
          "modifiedAttackRequirements": "NOT_DEFINED",
          "modifiedPrivilegesRequired": "NOT_DEFINED",
          "modifiedUserInteraction": "NOT_DEFINED",
          "modifiedVulnConfidentialityImpact": "NOT_DEFINED",
          "modifiedVulnIntegrityImpact": "NOT_DEFINED",
          "modifiedVulnAvailabilityImpact": "NOT_DEFINED",
          "modifiedSubConfidentialityImpact": "NOT_DEFINED",
          "modifiedSubIntegrityImpact": "NOT_DEFINED",
          "modifiedSubAvailabilityImpact": "NOT_DEFINED",
          "Safety": "NOT_DEFINED",
          "Automatable": "NOT_DEFINED",
          "Recovery": "NOT_DEFINED",
          "valueDensity": "NOT_DEFINED",
          "vulnerabilityResponseEffort": "NOT_DEFINED",
          "providerUrgency": "NOT_DEFINED"
        }
      }
    ],
    "cvssMetricV31": [
      {
        "source": "7ffcee3d-2c14-4c3e-b844-86c6a321a158",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N",
          "baseScore": 3.1,
          "baseSeverity": "LOW",
          "attackVector": "NETWORK",
          "attackComplexity": "HIGH",
          "privilegesRequired": "NONE",
          "userInteraction": "REQUIRED",
          "scope": "UNCHANGED",
          "confidentialityImpact": "NONE",
          "integrityImpact": "LOW",
          "availabilityImpact": "NONE"
        },
        "exploitabilityScore": 1.6,
        "impactScore": 1.4
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-07-16T12:53:15.866939Z",
          "id": "CVE-2026-15921",
          "options": [
            {
              "exploitation": "poc"
            },
            {
              "automatable": "no"
            },
            {
              "technicalImpact": "partial"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "7ffcee3d-2c14-4c3e-b844-86c6a321a158",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-22"
        },
        {
          "lang": "en",
          "value": "CWE-73"
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://github.com/nvm-sh/nvm/commit/9275c5badda1d9d0cdad6f34598a111033eadb42",
      "source": "7ffcee3d-2c14-4c3e-b844-86c6a321a158"
    },
    {
      "url": "https://github.com/nvm-sh/nvm/security/advisories/GHSA-4ghp-wxpw-rhpg",
      "source": "7ffcee3d-2c14-4c3e-b844-86c6a321a158"
    },
    {
      "url": "https://github.com/nvm-sh/nvm/security/advisories/GHSA-4ghp-wxpw-rhpg",
      "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"
    }
  ]
}