# CVE-2026-1665: Command Injection in nvm via NVM_AUTH_HEADER in wget code path

- Severity: Medium 5.4 (CVSS:4.0, scored by openjs) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.78%, higher than 57% of CVEs (2026-12-02)
- Published: 2026-01-29T23:04:05.741Z
- Modified: 2026-06-17T10:16:16.760Z
- Weaknesses: CWE-78, CWE-95
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: 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'.

(As written by CVE List.)

## Affected

- nvm-sh nvm: from 0.40.0 up to 0.40.3 (not affected: 0.40.4)

## References

- <https://github.com/nvm-sh/nvm/commit/44e2590cdf257faf7d885e4470be8dc66cec9506> (patch)
- <https://github.com/nvm-sh/nvm/releases/tag/v0.40.4> (release-notes)
- <https://github.com/nvm-sh/nvm> (product)
- <https://github.com/nvm-sh/nvm/pull/3380>

## Sources

- CVE List: [CVE-2026-1665](https://www.cve.org/CVERecord?id=CVE-2026-1665), CVE Terms of Use, modified 2026-01-30
- NVD: [CVE-2026-1665](https://nvd.nist.gov/vuln/detail/CVE-2026-1665), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-1665 · Whole record: https://cve.day/CVE-2026-1665.json · Rebuilt by cve.day 2026-11-25T22:59:13.310Z
