{"id":"CVE-2026-10796","summary":"nvm executes commands from a malicious Node.js mirror's version strings","details":"nvm (Node Version Manager) through 0.40.4 executes arbitrary commands from version strings supplied by the configured Node.js/io.js mirror. Commands such as `nvm install` read the available versions from the mirror's index.tab and use the selected version, without sanitization, to build download URLs and shell/awk commands. Two sinks are affected by the same untrusted input: nvm_download() built a curl/wget command string and ran it with `eval`, so a version field containing command substitution (for example $(id)) was executed by the local shell; and nvm_get_checksum() interpolated the version-derived download slug into an awk program, so a crafted version could execute arbitrary commands via awk's system(). An attacker who controls the configured mirror, supplies mirror content to a user or CI on a non-default mirror, or machine-in-the-middles a non-TLS mirror can ∴ run arbitrary commands with the privileges of the user running nvm. The default mirror (https://nodejs.org over TLS) is not affected. Fixed on master (pending the next tagged release) by passing every argument as a literal argv element instead of using eval, by passing the value to awk as data via -v instead of interpolating it into the program, and by rejecting any version outside the Node.js/io.js version grammar before it is used.","aliases":["GHSA-3c52-35h2-gfmm"],"modified":"2026-07-08T08:12:22.474965051Z","published":"2026-06-04T17:02:23.805Z","database_specific":{"cwe_ids":["CWE-78"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/10xxx/CVE-2026-10796.json","cna_assigner":"openjs"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/10xxx/CVE-2026-10796.json"},{"type":"ADVISORY","url":"https://github.com/nvm-sh/nvm/security/advisories/GHSA-3c52-35h2-gfmm"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-10796"},{"type":"FIX","url":"https://github.com/nvm-sh/nvm/commit/6d870d182cd5333647ffa16c0d7dbcd817ec27a8"},{"type":"FIX","url":"https://github.com/nvm-sh/nvm/commit/70fb4ede6b9731d75d86451d48caa5faffbec21c"},{"type":"FIX","url":"https://github.com/nvm-sh/nvm/commit/90bb88748ba6c29c2cec73b18ed7057413aef308"},{"type":"PACKAGE","url":"https://github.com/nvm-sh/nvm"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/nvm-sh/nvm","events":[{"introduced":"0"},{"fixed":"1889911f0841e669de0be5bd02c737a3f1fd20fa"},{"fixed":"6d870d182cd5333647ffa16c0d7dbcd817ec27a8"},{"fixed":"70fb4ede6b9731d75d86451d48caa5faffbec21c"},{"fixed":"90bb88748ba6c29c2cec73b18ed7057413aef308"}],"database_specific":{"source":["CPE_RANGE","REFERENCES"],"cpe":"cpe:2.3:a:openjsf:node_version_manager:*:*:*:*:*:node.js:*:*","extracted_events":[{"introduced":"0"},{"fixed":"0.40.5"}]}}],"versions":["v0.40.4","v0.40.3","v0.40.2","v0.40.1","v0.40.0","v0.39.7","v0.39.6","v0.39.5","v0.39.4","v0.39.3","v0.39.2","v0.39.1","v0.39.0","v0.38.0","v0.37.2","v0.37.1","v0.37.0","v0.36.0","v0.35.3","v0.35.2","v0.35.1","v0.35.0","v0.34.0","v0.33.9","v0.33.8","v0.33.7","v0.33.6","v0.33.5","v0.33.4","v0.33.3","v0.33.2","v0.33.1","v0.33.0","v0.32.1","v0.32.0","v0.31.7","v0.31.6","v0.31.5","v0.31.4","v0.31.3","v0.31.2","v0.31.1","v0.31.0","v0.30.2","v0.30.1","v0.30.0","v0.29.0","v0.28.0","v0.27.1","v0.27.0","v0.26.1","v0.26.0","v0.25.4","v0.25.3","v0.24.1","v0.25.2","v0.25.1","v0.25.0","v0.24.0","v0.23.3","v0.23.2","v0.23.1","v0.23.0","v0.22.2","v0.22.1","v0.22.0","v0.21.0","v0.20.0","v0.19.0","v0.18.0","v0.17.2","v0.17.1","v0.17.0","v0.16.1","v0.16.0","v0.15.0","v0.14.0","v0.13.1","v0.13.0","v0.12.2","v0.12.1","v0.12.0","v0.11.2","v0.11.1","v0.11.0","v0.10.0","v0.9.0","v0.8.0","v0.7.0","v0.6.1","v0.6.0","v0.5.1","v0.5.0","v0.4.0","v0.3.0","v0.2.0","v0.1.0","v0.0.6","v0.0.1"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-10796.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"}]}