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…

CVE-2026-1665: CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in nvm-sh nvm

0
Medium
VulnerabilityCVE-2026-1665cvecve-2026-1665cwe-78cwe-95
Published: Thu Jan 29 2026 (01/29/2026, 23:04:05 UTC)
Source: CVE Database V5
Vendor/Project: nvm-sh
Product: nvm

Description

CVE-2026-1665 is a command injection vulnerability in nvm (Node Version Manager) versions 0. 40. 3 and below. The vulnerability arises because the nvm_download() function uses eval to execute wget commands without properly sanitizing the NVM_AUTH_HEADER environment variable. An attacker who can control environment variables in a victim’s shell environment—such as through malicious CI/CD configurations, compromised dotfiles, or Docker images—can inject arbitrary shell commands. These commands execute when the victim runs nvm commands that trigger downloads, like 'nvm install' or 'nvm ls-remote'. The CVSS 4. 0 score is 5. 4 (medium severity), reflecting the need for local privileges and user interaction. There are no known exploits in the wild yet.

AI-Powered Analysis

AILast updated: 02/06/2026, 08:46:31 UTC

Technical Analysis

CVE-2026-1665 is a medium-severity OS command injection vulnerability affecting nvm (Node Version Manager) versions 0.40.3 and earlier. The root cause is improper neutralization of special elements in the NVM_AUTH_HEADER environment variable within the nvm_download() function. This function uses the eval command to execute wget commands for downloading Node.js versions or metadata. While the curl code path sanitizes this environment variable, the wget path does not, allowing an attacker who can set environment variables in the victim’s shell environment to inject arbitrary shell commands. Such environment variable control can be achieved through compromised CI/CD pipelines, malicious dotfiles, or tainted Docker images. When the victim runs nvm commands that trigger downloads (e.g., 'nvm install' or 'nvm ls-remote'), the injected commands execute with the victim’s privileges. The vulnerability requires local or limited privileges (PR:L) and user interaction (UI:P) to trigger, and it does not affect system-wide security controls (SC:N). The impact on confidentiality, integrity, and availability is high if exploited, as arbitrary code execution can lead to system compromise. No patches or fixes are currently linked, and no known exploits are reported in the wild. This vulnerability highlights the risks of using eval with unsanitized input and the importance of securing environment variables in developer tooling and automated environments.

Potential Impact

For European organizations, the impact of CVE-2026-1665 can be significant, particularly for those relying heavily on Node.js development environments, CI/CD pipelines, and containerized deployments using nvm. Successful exploitation could lead to arbitrary code execution on developer workstations or build servers, potentially compromising source code integrity, leaking sensitive information, or enabling lateral movement within internal networks. Organizations with automated build and deployment processes are at higher risk, as attackers could inject malicious commands via environment variables in CI/CD configurations or Docker images. This could disrupt software supply chains or introduce backdoors into production software. The medium CVSS score reflects the need for some level of access and user interaction, but the potential damage to confidentiality, integrity, and availability is high if exploited. European companies in technology, finance, and critical infrastructure sectors that depend on Node.js development tools should be particularly vigilant.

Mitigation Recommendations

To mitigate this vulnerability, European organizations should: 1) Immediately audit and sanitize environment variables, especially NVM_AUTH_HEADER, in all developer and CI/CD environments to prevent injection of malicious content. 2) Avoid using nvm versions 0.40.3 and below; upgrade to the latest patched version once available. 3) Restrict permissions and access to CI/CD configurations, dotfiles, and Docker images to trusted personnel only. 4) Implement strict validation and sanitization of environment variables in build and deployment pipelines. 5) Use container image scanning tools to detect malicious environment variable settings or injected commands. 6) Educate developers and DevOps teams about the risks of environment variable injection and the dangers of using eval with unsanitized input. 7) Monitor logs and system behavior for unusual command execution patterns during nvm operations. 8) Consider isolating build environments to limit the impact of potential compromise. These steps go beyond generic advice by focusing on environment variable hygiene, access control, and pipeline security specific to the nature of this vulnerability.

Need more detailed analysis?Upgrade to Pro Console

Technical Details

Data Version
5.2
Assigner Short Name
openjs
Date Reserved
2026-01-29T21:25:18.405Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 697becf3ac06320222c55bad

Added to database: 1/29/2026, 11:27:47 PM

Last enriched: 2/6/2026, 8:46:31 AM

Last updated: 2/7/2026, 2:31:00 PM

Views: 49

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 in Console -> Billing for AI refresh and higher limits.

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

Latest Threats