CVE-2026-1665 Details
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'.
A command injection vulnerability has been identified in Node Version Manager (nvm) versions 0.40.3 and prior. The issue arises in the nvm_download() function, which uses eval to execute wget commands. The NVM_AUTH_HEADER environment variable was not properly sanitized in the wget code path, creating an opportunity for attackers to inject arbitrary shell commands. This vulnerability can be exploited when nvm commands that trigger downloads, such as 'nvm install' or 'nvm ls-remote', are executed in a shell environment where the NVM_AUTH_HEADER has been manipulated.
Users can update to nvm version 0.40.4 or later, where this vulnerability has been fixed.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jan 29, 2026CISA-ADP
Assessed Jan 30, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/nvm-sh/nvm | openjs | Vendor |
| https://github.com/nvm-sh/nvm/commit/44e2590cdf257faf7d885e4470be8dc66cec9506 | openjs | Source CodeVendor |
| https://github.com/nvm-sh/nvm/pull/3380 | openjs | ExploitIssue TrackingTechnical DescriptionVendor |
| https://github.com/nvm-sh/nvm/releases/tag/v0.40.4 | openjs | Release NotesVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | openjs |
| CWE-95 | Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection') | openjs |
Affected Products
| Product | Versions |
|---|---|
| nvm | All versions |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | openjs |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jan 29, 2026 | New CVE Received | openjs |
Volerion