CVE-2026-121749
Received Received - Intake

Path Traversal in Node Version Manager

Vulnerability report for CVE-2026-121749, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-11-04

Last updated on: 2026-11-04

Assigner: harborist

Description

Node Version Manager (nvm) is a POSIX-compliant shell function for managing multiple node.js versions. In versions 0.5.0 through 0.40.8, the requested version pattern is passed to `grep` as a bare argument, without `-e`, in `nvm_ls_remote_index_tab`, `nvm_remote_version`, and `nvm_ls_cached`. A `.nvmrc` whose first line starts with `-`, such as `-Rohenpm_[A-Za-z0-9]*`, is parsed as grep options; with GNU grep, `-R` searches the current directory recursively (following symlinks) instead of the version list. On a bare `nvm install`, nvm then treats a matched string from those files as the version, prints it, and requests it from the configured mirror inside download URLs, so for example a repository containing a symlink to `../../.npmrc` can leak the user's npm token to the terminal and to the mirror's and any proxy's logs. The disclosure is read-only and limited to the characters `0-9A-Za-z._+-`. Version 0.41.0 passes every version pattern to grep with `-e`.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-11-04
Last Modified
2026-11-04
Generated
2026-11-05
AI Q&A
2026-11-05
EPSS Evaluated
N/A
NVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
nvm-sh nvm 0.5.0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-88 The product constructs a string for a command to be executed by a separate component in another control sphere, but it does not properly delimit the intended arguments, options, or switches within that command string.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability affects Node Version Manager (nvm) versions 0.5.0 through 0.40.8. It allows a specially crafted .nvmrc file to manipulate grep commands by starting with a dash (-), tricking grep into interpreting it as an option. This can lead to unintended directory traversal or information leaks.

Detection Guidance

Check for .nvmrc files with first lines starting with a hyphen (-) using grep. Inspect nvm installation scripts for version patterns passed to grep without -e flag. Review system logs for unusual version requests or symlink traversals during nvm operations.

Impact Analysis

An attacker could create a malicious .nvmrc file in a repository you clone, causing nvm to leak sensitive data like npm tokens to logs or terminal output. The impact is limited to read-only access and specific character sets.

Mitigation Strategies

Upgrade nvm to version 0.41.0 or later. Remove or correct any .nvmrc files with leading hyphens. Monitor for unauthorized version requests or symlink-based file access. Restrict write permissions on .nvmrc files to prevent tampering.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-121749. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...