Home / nvm-sh / nvm / CVE-2026-15921
CVE-2026-15921: is it exploited, and which versions of nvm-sh nvm are affected and fixed?
CVE-2026-15921 is a path traversal (reading or writing files outside the intended folder) vulnerability in nvm-sh nvm. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 18:09 UTC). Affected: nvm from 0.32.1 before 0.40.6 (CVE record by harborist). Fixed in 0.40.6 (CVE record by harborist). Severity: Low (2.1, CVSS 4.0, from harborist).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 18:09 UTC, CVE record November 19, 2026, 07:08 UTC and NVD November 19, 2026, 07:09 UTC.
What is CVE-2026-15921?
nvm path traversal via a malicious mirror's LTS codename writes outside the alias directory
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.
From the CVE record by harborist, last updated July 16, 2026, 12:53 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| nvm-sh | nvm | from 0.32.1 before 0.40.6 | 0.40.6 |
As the CVE record by harborist states it, last updated July 16, 2026. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
How severe is CVE-2026-15921?
| Score | Version | Vector | Source |
|---|---|---|---|
| Low 2.1 | CVSS 4.0 | 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 | harborist |
| Low 3.1 | CVSS 3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N | harborist |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2026-15921 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- CISA SSVC
- Exploitation: poc; automatable: no; technical impact: partial (CISA ADP, July 16, 2026)
- EPSS
- 0.26% probability of exploitation activity in the next 30 days, percentile 19.5 (FIRST EPSS, scores of December 3, 2026)
What kind of flaw is it?
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory
- CWE-73 External Control of File Name or Path
How do I fix it? (from the CVE record)
Upgrade to nvm 0.40.6 or later, which validates remote LTS codenames and rejects `..` path components when writing alias files. (Only needed if using a non-default mirror whose metadata contents you do not trust).
Is there a workaround? (from the CVE record)
Until upgrading, only run `nvm ls-remote` and LTS-refreshing commands against trusted mirrors over TLS, and ensure `NVM_NODEJS_ORG_MIRROR` and `NVM_IOJS_ORG_MIRROR` point only at trusted endpoints.
Where are the vendor advisories and references?
- GHSA-4ghp-wxpw-rhpg vendor-advisory
- Fix commit 9275c5ba patch
Who found and reported it?
- Sy2n0 (https://github.com/Sy2n0) (finder)
- Jordan Harband (https://github.com/ljharb) (remediation developer)
As published in the CVE record; contact details are removed.
When was it published, and where is the official record?
- Reserved
- July 15, 2026
- Published
- July 15, 2026, 21:16 UTC
- CVE record updated
- July 16, 2026, 12:53 UTC by harborist
- NVD
- Awaiting Analysis, last modified October 24, 2026, 21:10 UTC
- Last checked
- CVE list November 19, 2026, 07:08 UTC; NVD November 19, 2026, 07:09 UTC; KEV December 3, 2026, 18:09 UTC; EPSS December 3, 2026
- Official record
- cve.org · NVD
What other CVEs affect nvm?
- Nov 4, 2026CVE-2026-121746 nvm-sh nvm: link following (a symlink lets an attacker reach other files)
- Nov 4, 2026CVE-2026-121749 nvm-sh nvm: argument injection
- Nov 4, 2026CVE-2026-121747 nvm-sh nvm: link following (a symlink lets an attacker reach other files)
- Nov 4, 2026CVE-2026-121748 nvm-sh nvm: external Control of File Name or Path
- Nov 4, 2026CVE-2026-121750 nvm-sh nvm: download of Code Without Integrity Check
- Nov 4, 2026CVE-2026-121745 nvm-sh nvm: invocation of Process Using Visible Sensitive Information
- Nov 4, 2026CVE-2026-121751 nvm-sh nvm: OS command injection
- Oct 29, 2026CVE-2026-118905 nvm-sh nvm: OS command injection
Questions about CVE-2026-15921
Is CVE-2026-15921 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 18:09 UTC. FIRST's EPSS gives it a 0.26% chance of exploitation activity in the next 30 days (scores of December 3, 2026).
Which versions of nvm-sh nvm are affected by CVE-2026-15921?
nvm from 0.32.1 before 0.40.6, per the CVE record by harborist. The tables above give every range the sources list.
Which version fixes CVE-2026-15921?
0.40.6, per the CVE record by harborist. Check the vendor's advisory before you rely on it.
How severe is CVE-2026-15921?
Low (2.1, CVSS 4.0, from harborist). The severity table above shows each score with its source.
Where is the official record of CVE-2026-15921?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.