Home / nvm-sh / nvm / CVE-2026-1665
CVE-2026-1665: is it exploited, and which versions of nvm-sh nvm are affected and fixed?
CVE-2026-1665 is an OS command injection vulnerability in nvm-sh nvm. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 11:38 UTC). Affected: nvm from 0.40.0 through 0.40.3 (CVE record by openjs). Fixed in 0.40.4 (CVE record by openjs). Severity: Medium (5.4, CVSS 4.0, from openjs).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 11:38 UTC, CVE record November 19, 2026, 07:09 UTC and NVD November 19, 2026, 07:13 UTC.
What is CVE-2026-1665?
Command Injection in nvm via NVM_AUTH_HEADER in wget code path
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'.
From the CVE record by openjs, last updated January 30, 2026, 18:27 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| nvm-sh | nvm | from 0.40.0 through 0.40.3 | 0.40.4 |
As the CVE record by openjs states it, last updated January 30, 2026. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
How severe is CVE-2026-1665?
| Score | Version | Vector | Source |
|---|---|---|---|
| Medium 5.4 | CVSS 4.0 | 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 | openjs |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2026-1665 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- CISA SSVC
- Exploitation: none; automatable: no; technical impact: total (CISA ADP, January 30, 2026)
- EPSS
- 0.78% probability of exploitation activity in the next 30 days, percentile 57.1 (FIRST EPSS, scores of December 2, 2026)
What kind of flaw is it?
- CWE-78 Improper Neutralization of Special Elements used in an OS Command
- CWE-95 Improper Neutralization of Directives in Dynamically Evaluated Code
How do I fix it? (from the CVE record)
Upgrade to nvm version 0.40.4 or later, which sanitizes NVM_AUTH_HEADER in the wget code path using nvm_sanitize_auth_header().
Where are the vendor advisories and references?
- Fix commit patch
- Release v0.40.4 release-notes
- nvm GitHub repository product
- https://github.com/nvm-sh/nvm/pull/3380 x_introduced
Who found and reported it?
- Jiyong Yang (finder)
As published in the CVE record; contact details are removed.
When was it published, and where is the official record?
- Reserved
- January 29, 2026
- Published
- January 29, 2026, 23:04 UTC
- CVE record updated
- January 30, 2026, 18:27 UTC by openjs
- NVD
- Deferred, last modified June 17, 2026, 10:16 UTC
- Last checked
- CVE list November 19, 2026, 07:09 UTC; NVD November 19, 2026, 07:13 UTC; KEV December 3, 2026, 11:38 UTC; EPSS December 2, 2026
- Official record
- cve.org · NVD
What other CVEs affect nvm?
- Nov 4, 2026CVE-2026-121746 nvm-sh nvm: link following (a symlink lets an attacker reach other files)
- Nov 4, 2026CVE-2026-121749 nvm-sh nvm: argument injection
- Nov 4, 2026CVE-2026-121747 nvm-sh nvm: link following (a symlink lets an attacker reach other files)
- Nov 4, 2026CVE-2026-121748 nvm-sh nvm: external Control of File Name or Path
- Nov 4, 2026CVE-2026-121750 nvm-sh nvm: download of Code Without Integrity Check
- Nov 4, 2026CVE-2026-121745 nvm-sh nvm: invocation of Process Using Visible Sensitive Information
- Nov 4, 2026CVE-2026-121751 nvm-sh nvm: OS command injection
- Oct 29, 2026CVE-2026-118905 nvm-sh nvm: OS command injection
Questions about CVE-2026-1665
Is CVE-2026-1665 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 11:38 UTC. FIRST's EPSS gives it a 0.78% chance of exploitation activity in the next 30 days (scores of December 2, 2026).
Which versions of nvm-sh nvm are affected by CVE-2026-1665?
nvm from 0.40.0 through 0.40.3, per the CVE record by openjs. The tables above give every range the sources list.
Which version fixes CVE-2026-1665?
0.40.4, per the CVE record by openjs. Check the vendor's advisory before you rely on it.
How severe is CVE-2026-1665?
Medium (5.4, CVSS 4.0, from openjs). The severity table above shows each score with its source.
Where is the official record of CVE-2026-1665?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.