Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.3%top 74%

CVE-2026-15921: CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in nvm-sh nvm

0
Low
VulnerabilityCVE-2026-15921cvecve-2026-15921cwe-22cwe-73
Published: 07/15/2026 (07/15/2026, 21:16:46 UTC)
Source: CVE Database V5
Vendor/Project: nvm-sh
Product: nvm

Description

Node Version Manager (nvm) versions 0.32.1 through 0.40.5 contain a path traversal vulnerability in commands that refresh remote LTS aliases, such as `nvm ls-remote` and `nvm install --lts`. This occurs because nvm uses the LTS codename from the node.js mirror as an alias filename without validating it, allowing a malicious mirror to cause files outside the intended directory to be overwritten. Exploitation requires use of a hostile mirror and running an affected command. Version 0.40.6 and later validate these codenames to prevent this issue.

CVSS v4.0

Score 2.1low

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Active
Vuln. Confidentiality
None
Vuln. Integrity
Low
Vuln. Availability
None
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

Affected software

nvm
pkg:npm/nvm
Affected versions
>=0.32.1 <0.40.6

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/22/2026, 23:01:31 UTC

Technical Analysis

The vulnerability (CVE-2026-15921) in nvm-sh's nvm affects versions 0.32.1 through 0.40.5. The `nvm ls-remote` and similar commands parse the node.js mirror's `index.tab` file and use the LTS codename field as an alias filename without proper validation. A malicious or compromised mirror can supply an LTS codename containing path traversal sequences (e.g., `../../../.bashrc`), causing nvm to write alias files outside the intended `$NVM_DIR/alias` directory. This can overwrite critical user files such as shell startup scripts, potentially leading to code execution in subsequent shell sessions. Exploitation requires the user to run an affected command while configured to use a hostile mirror. The issue is fixed in version 0.40.6 by validating and rejecting unsafe path components in LTS codenames.

Potential Impact

An attacker controlling or intercepting the node.js mirror used by nvm can cause arbitrary files in the user's home directory to be created or overwritten by supplying malicious LTS codenames with path traversal sequences. This can lead to persistent code execution when the user starts a new shell session, by overwriting shell startup files. The vulnerability requires user interaction to run affected nvm commands and the use of a hostile mirror, limiting the attack scope. The CVSS score is low (2.1) reflecting these conditions.

Mitigation Recommendations

Users should upgrade nvm to version 0.40.6 or later, which includes validation to reject unsafe LTS codename aliases and prevents path traversal. Until upgraded, users should avoid using untrusted or compromised mirrors and be cautious about network environments that could enable man-in-the-middle attacks on the mirror URL. Patch status is not explicitly confirmed in the advisory, but version 0.40.6 contains the fix. No other mitigations are specified.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
harborist
Date Reserved
2026-07-15T20:49:26.387Z
Cvss Version
4.0
State
PUBLISHED
Remediation Level
null

Threat ID: 6a57fcc868715ace4384e498

Added to database: 07/15/2026, 21:34:00 UTC

Last enriched: 07/22/2026, 23:01:31 UTC

Last updated: 08/29/2026, 22:52:09 UTC

Views: 71

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses