{"id":"CVE-2026-1665","published":"2026-01-29T23:04:05Z","modified":"2026-01-30T18:27:52Z","title":"Command Injection in nvm via NVM_AUTH_HEADER in wget code path","vendor":"nvm-sh","product":"nvm","tier":"tail","description":{"text":"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'.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.4,"severity":"MEDIUM","version":"4.0","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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00779,"percentile":0.56797,"provenance":"source"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"},{"id":"CWE-95","name":"Improper Neutralization of Directives in Dynamically Evaluated Code"}],"references":[{"url":"https://github.com/nvm-sh/nvm/commit/44e2590cdf257faf7d885e4470be8dc66cec9506","tags":["patch"]},{"url":"https://github.com/nvm-sh/nvm/releases/tag/v0.40.4","tags":["release-notes"]},{"url":"https://github.com/nvm-sh/nvm","tags":["product"]},{"url":"https://github.com/nvm-sh/nvm/pull/3380","tags":["x_introduced"]}],"priority":{"score":15.1,"factors":[{"name":"EPSS percentile","points":11.36},{"name":"CVSS severity","points":3.78}]},"vendorSlug":"nvm-sh","affectedVersions":[{"vendor":"nvm-sh","product":"nvm","versions":[">= 0.40.0, <= 0.40.3"]}],"fixedVersions":[{"vendor":"nvm-sh","product":"nvm","versions":["0.40.4"]}],"solutions":{"items":["Upgrade to nvm version 0.40.4 or later, which sanitizes NVM_AUTH_HEADER in the wget code path using nvm_sanitize_auth_header()."],"from":"CVE.org CNA","provenance":"source"},"capec":[{"id":"CAPEC-88","name":"OS Command Injection"},{"id":"CAPEC-6","name":"Argument Injection"}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-01-30T18:27:21.196460Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-5014","exploited":false,"provenance":"source"}}