CVE-2026-1665
published medium CVSS 4.0 · 5.4Command Injection in nvm via NVM_AUTH_HEADER in wget code path
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| nvm-sh | — | nvm0.40.0 through 0.40.3 (affected · semver) · 0.40.4 (unaffected · semver) · Other versions: unaffected | Version-specific | Not stated | 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'.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 5.4 / 10
- Severity
- medium
- Provider
- openjs · cna
- Vector string
- 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
- Scenarios
- en: GENERAL
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| nvm-sh | nvm | 0.40.0 through 0.40.3 (affected · semver)0.40.4 (unaffected · semver)Default: unaffected | openjs · cna |
Weaknesses
2- CWE-78 CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
- CWE-95 CWE-95 Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')
References
4- nvm GitHub repository https://github.com/nvm-sh/nvm
- Fix commit https://github.com/nvm-sh/nvm/commit/44e2590cdf257faf7d885e4470be8dc66cec9506
- https://github.com/nvm-sh/nvm/pull/3380
- Release v0.40.4 https://github.com/nvm-sh/nvm/releases/tag/v0.40.4
Provider assertions
2openjs · cna
Command Injection in nvm via NVM_AUTH_HEADER in wget code path
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 3cba7a623799501c309e1d1b441a153ce3d6dca3174d02431414585611b9af4e
- Ingested
- 23 Sep 2026, 09:04:24 UTC
- Source record
- Official CVE record