CVE-2026-1665
Unknown Unknown - Not Provided
Command Injection in nvm Download Function via Unsanitized Env Variable

Publication date: 2026-01-29

Last updated on: 2026-01-29

Assigner: openjs

Description
A command injection vulnerability exists in nvm (Node Version Manager) versions 0.40.3 and below. The nvm_download() function uses eval to execute wget commands, and the NVM_AUTH_HEADER environment variable was not sanitized in the wget code path (though it was sanitized in the curl code path). An attacker who can set environment variables in a victim's shell environment (e.g., via malicious CI/CD configurations, compromised dotfiles, or Docker images) can inject arbitrary shell commands that execute when the victim runs nvm commands that trigger downloads, such as 'nvm install' or 'nvm ls-remote'.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-01-29
Last Modified
2026-01-29
Generated
2026-05-27
AI Q&A
2026-01-30
EPSS Evaluated
2026-05-25
NVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
unknown_vendor nvm to 0.40.3 (inc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-78 The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
CWE-95 The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes code syntax before using the input in a dynamic evaluation call (e.g. "eval").
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability is a command injection issue in nvm (Node Version Manager) versions 0.40.3 and below. Specifically, the nvm_download() function uses eval to execute wget commands, and the NVM_AUTH_HEADER environment variable is not sanitized in the wget code path. This allows an attacker who can set environment variables in a victim's shell environment to inject arbitrary shell commands. These commands execute when the victim runs nvm commands that trigger downloads, such as 'nvm install' or 'nvm ls-remote'.


How can this vulnerability impact me? :

An attacker who can control environment variables in your shell environment can inject and execute arbitrary shell commands when you run certain nvm commands that trigger downloads. This can lead to unauthorized command execution, potentially compromising your system or environment.


What immediate steps should I take to mitigate this vulnerability?

To mitigate this vulnerability, avoid using nvm versions 0.40.3 and below. Do not run nvm commands that trigger downloads, such as 'nvm install' or 'nvm ls-remote', in environments where untrusted users can set environment variables. Ensure that environment variables like NVM_AUTH_HEADER are not set by untrusted sources, such as malicious CI/CD configurations, compromised dotfiles, or Docker images. Consider upgrading to a version of nvm that fixes this vulnerability once available.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart