CVE-2026-15921: nvm path traversal via a malicious mirror's LTS codename writes outside the alias directory

Published Jul 15, 2026
·
Updated

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 $NVMDIR/alias. With the default layout ($NVMDIR 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 NVMNODEJSORGMIRROR/NVMIOJSORGMIRROR -- 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.

Affected Software

2 affected components
nvm Node Version Manager (nvm)>=0.32.1<=0.40.5
nvm Node Version Manager (nvm)>0.40.5<=0.40.6

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade nvm to a version that resolves this vulnerability.

    Fixed in 0.40.6

Event History

Jul 15, 2026
CVE Published
via MITRE·09:16 PM
Data Sourced
via MITRE·09:16 PM
RemedyDescriptionSeverityWeakness
Data Sourced
via NVD·10:16 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

What is the severity of CVE-2026-15921?

The severity of CVE-2026-15921 is classified as low with a score of 3.1.

2

What types of impact does CVE-2026-15921 have?

CVE-2026-15921 can lead to limited integrity issues due to path traversal vulnerabilities.

3

How do I fix CVE-2026-15921?

To mitigate CVE-2026-15921, update to the latest version of Node Version Manager (nvm) that addresses this vulnerability.

4

Which versions of nvm are affected by CVE-2026-15921?

CVE-2026-15921 affects nvm versions 0.32.1 through 0.40.5.

5

What is the nature of the vulnerability in CVE-2026-15921?

CVE-2026-15921 is a path traversal vulnerability that allows malicious LTS codenames to write outside the alias directory.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203