{"id":"CVE-2026-1665","state":"PUBLISHED","title":"Command Injection in nvm via NVM_AUTH_HEADER in wget code path","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'.","publishedAt":"2026-01-29T23:04:05.741Z","updatedAt":"2026-01-30T18:27:52.134Z","severity":{"score":5.4,"label":"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","source":"openjs"},"assigner":"openjs","products":["nvm-sh nvm"],"affected":[{"vendor":"nvm-sh","product":"nvm","defaultStatus":"unaffected","versions":[{"version":"0.40.0","status":"affected","lessThanOrEqual":"0.40.3","versionType":"semver"},{"version":"0.40.4","status":"unaffected","versionType":"semver"}]}],"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"],"weaknesses":["CWE-78","CWE-95"],"ingestedAt":"2026-10-29T20:11:10.572Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/1xxx/CVE-2026-1665.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-1665","state":"PUBLISHED","datePublished":"2026-01-29T23:04:05.741Z","dateUpdated":"2026-01-30T18:27:52.134Z","assignerShortName":"openjs","assignerOrgId":"ce714d77-add3-4f53-aff5-83d477b104bb","dateReserved":"2026-01-29T21:25:18.405Z"},"containers":{"cna":{"title":"Command Injection in nvm via NVM_AUTH_HEADER in wget code path","descriptions":[{"lang":"en","value":"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'."}],"affected":[{"vendor":"nvm-sh","product":"nvm","defaultStatus":"unaffected","versions":[{"version":"0.40.0","status":"affected","lessThanOrEqual":"0.40.3","versionType":"semver"},{"version":"0.40.4","status":"unaffected","versionType":"semver"}]}],"references":[{"url":"https://github.com/nvm-sh/nvm/commit/44e2590cdf257faf7d885e4470be8dc66cec9506","name":"Fix commit","tags":["patch"]},{"url":"https://github.com/nvm-sh/nvm/releases/tag/v0.40.4","name":"Release v0.40.4","tags":["release-notes"]},{"url":"https://github.com/nvm-sh/nvm","name":"nvm GitHub repository","tags":["product"]},{"url":"https://github.com/nvm-sh/nvm/pull/3380","tags":["x_introduced"]}],"metrics":[{"cvssV4_0":{"attackComplexity":"LOW","attackRequirements":"PRESENT","attackVector":"LOCAL","baseScore":5.4,"baseSeverity":"MEDIUM","exploitMaturity":"NOT_DEFINED","privilegesRequired":"LOW","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"PASSIVE","valueDensity":"NOT_DEFINED","vectorString":"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","version":"4.0","vulnAvailabilityImpact":"HIGH","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"HIGH","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-78","description":"CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')","lang":"en","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-95","description":"CWE-95 Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"openjs","orgId":"ce714d77-add3-4f53-aff5-83d477b104bb","dateUpdated":"2026-01-29T23:06:47.873Z"},"credits":[{"lang":"en","type":"finder","value":"Jiyong Yang (sy2n0@naver.com)"}],"impacts":[{"capecId":"CAPEC-88","descriptions":[{"lang":"en","value":"CAPEC-88 OS Command Injection"}]},{"capecId":"CAPEC-6","descriptions":[{"lang":"en","value":"CAPEC-6 Argument Injection"}]}],"solutions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>Upgrade to nvm version 0.40.4 or later, which sanitizes NVM_AUTH_HEADER in the wget code path using nvm_sanitize_auth_header().</p>"}],"value":"Upgrade to nvm version 0.40.4 or later, which sanitizes NVM_AUTH_HEADER in the wget code path using nvm_sanitize_auth_header()."}],"source":{"discovery":"EXTERNAL"},"timeline":[{"lang":"en","time":"2026-01-09T00:00:00.000Z","value":"Fix committed"},{"lang":"en","time":"2026-01-29T00:00:00.000Z","value":"v0.40.4 released"}]},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-01-30T18:27:21.196460Z","id":"CVE-2026-1665","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-01-30T18:27:52.134Z"}}]}}}