---
id: "CVE-2026-121750"
kind: "vulnerability"
aliases: ["CVE-2026-121750"]
title: "nvm: rejected Node.js archive stays cached and can still be installed"
severity: "low"
cvss: 3.1
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["ci", "developers", "node", "nvm", "package"]
not_affected_if: ["no-offline-install", "nvm-0.41.0-or-later", "trusted-download-path"]
published_at: "2026-11-04T22:17:54+00:00"
first_seen_at: "2026-11-04T23:08:47+00:00"
updated_at: "2026-11-04T23:10:13+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-121750", "first_seen_at": "2026-11-04T23:08:47+00:00"}]
exploit_sources: []
---

# nvm: rejected Node.js archive stays cached and can still be installed

nvm versions 0.40.5 through 0.40.8 keep a Node.js archive in its cache even after its checksum fails, and a later offline install uses that archive without checking it again. An attacker who can alter the downloaded tarball but cannot forge the checksum file can get their code run as node and npm on the victim's machine.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Run `nvm --version` and check whether it reports a version from `0.40.5` to `0.40.8`
- Look for leftover archives in `$NVM_DIR/.cache` after a failed install
- Check whether anyone runs `nvm install --offline` in scripts or CI

## Fix

- nvm `0.41.0` only caches an archive once its checksum has passed

## Timeline

- 2026-11-04T23:08:47+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-121750

## Documents

- [advisory] Vendor advisory: github.com https://github.com/nvm-sh/nvm/security/advisories/GHSA-262q-c465-prmr
- [fix] Patch: github.com https://github.com/nvm-sh/nvm/commit/1f99e4c20bb92c5737b92512446acf8e303b1edd

## From the sources

Node Version Manager (nvm) is a POSIX-compliant shell function for managing multiple node.js versions. In versions 0.40.5 through 0.40.8, `nvm_download_artifact` downloads a release archive directly to its final path in `$NVM_DIR/.cache` and verifies its checksum afterwards; on a checksum mismatch it reports an error but leaves the rejected archive in place. A later `nvm install --offline` of the same version installs that cached file without a checksum, so an archive that was just rejected gets installed and its `node` and `npm` run. This gives code execution to a party who can alter the downloaded tarball (for example a poisoned CDN or cache object) but cannot also forge the `SHASUMS256.txt` beside it, if the victim runs `nvm install --offline` for that version after the visible "Checksums do not match" failure and before any online retry. Version 0.41.0 only puts an archive in the cache once its checksum has passed.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
