Nvm-sh vulnerabilities
In the last 30 days, 8 Nvm-sh vulnerabilities were published: 0 critical, 0 actively exploited. Most common weakness: OS command injection (CWE-78).
CVSS score: 7.1 Severity: High Identifier: CVE-2026-118905 nvm_ls lets an untrusted version string inject sed commands, executing arbitrary commands with GNU sed Package: nvm fixed in 0.40.6 Published Published
Node Version Manager (nvm) is a POSIX-compliant shell function for managing multiple node.js versions. In versions 0.31.2 through 0.40.5, nvm_ls filters installed versions with a sed program that embeds the requested version pattern in a \#...# address, escaping . (and, since 0.40.4, #) but not backslash. A version string containing # (or \#) therefore closes the address early, and the rest of it is parsed as sed commands: with GNU sed, the e command runs a shell command as the user; with BSD sed, the w and r commands write and read files. This is reachable whenever an attacker-influenced version string is passed to nvm use, nvm which, nvm ls, nvm version, nvm run, or nvm exec, or to nvm-exec via NODE_VERSION, and at least one version is installed. nvm's own .nvmrc parser strips comments, so a bare nvm use is not affected; however, the bash cdnvm and zsh load-nvmrc auto-switch hooks documented in the README read .nvmrc as-is and pass it to nvm ls and nvm version, so a user with one of those hooks installed runs the attacker's command just by changing into a directory under a malicious .nvmrc; scripts that run nvm use "$(cat .nvmrc)" are affected the same way. Version 0.40.6 passes any version pattern containing # or a newline through the .nvmrc content parser first, so no # reaches the sed program.
- Exploitation
- No known exploitation
- EPSS
- 0.20% chance of exploitation in the next 30 days, higher than 5.8% of CVEs
- CVSS
- 7.1 out of 10 · source NVD (7ffcee3d-2c14-4c3e-b844-86c6a321a158)
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Versions
- 0.31.2 → <0.40.6 · fixed in 0.40.6
- Weakness
- CWE-78, CWE-94
- Sources
- CVE.org · NVD · EPSS
- Dates
- published Oct 29, 2026 · first seen here 4 h ago
CVSS score: 6.7 Severity: Medium Identifier: CVE-2026-121746 nvm use --save and nvm install --save write through a symlinked .nvmrc, overwriting any file the user can write Package: nvm fixed in 0.41.0 Published Published
Node Version Manager (nvm) is a POSIX-compliant shell function for managing multiple node.js versions. In versions 0.40.0 through 0.40.8, nvm use --save and nvm install --save (or -w) write the resolved version to $PWD/.nvmrc with tee, which follows a symbolic link. A repository that commits .nvmrc as a symlink to a path outside itself (git recreates the link on clone) therefore makes --save truncate any file the user can write, such as a shell startup file or ~/.ssh/authorized_keys, and replace its contents with the version string, or create the target of a dangling link; the link itself is left unchanged, so git status stays clean. The attacker does not control the content written, so this is data loss, not code execution. Version 0.41.0 refuses, with a warning, to write when .nvmrc in the current directory is a symlink, dangling or not, rather than writing through it or replacing it.
- Exploitation
- No known exploitation
- EPSS
- 0.19% chance of exploitation in the next 30 days, higher than 4.9% of CVEs
- CVSS
- 6.7 out of 10 · source NVD (7ffcee3d-2c14-4c3e-b844-86c6a321a158)
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Versions
- 0.40.0 → <0.41.0 · fixed in 0.41.0
- Weakness
- CWE-59
- Sources
- CVE.org · NVD · EPSS
- Dates
- published Nov 4, 2026 · first seen here 4 h ago
CVSS score: 6.7 Severity: Medium Identifier: CVE-2026-121747 nvm prints the contents of any readable file through a symlinked .nvmrc Package: nvm fixed in 0.41.0 Published Published
Node Version Manager (nvm) is a POSIX-compliant shell function for managing multiple node.js versions. In versions 0.2.0 through 0.40.8, nvm does not check whether .nvmrc is a symbolic link. A repository or archive that ships .nvmrc as a symlink to another file (for example ../../.npmrc, or /proc/self/environ on Linux) makes a plain nvm use, nvm install, nvm which, nvm exec, nvm run, or nvm-exec read that file and print its contents in the invalid-.nvmrc message (even with --silent) or, for a one-line file, in the Found ... with version <...> message; with the README's zsh load-nvmrc or bash cdnvm hook installed, entering the directory is enough. nvm sends the content nowhere; the attacker learns it only where they can see the victim's output, such as a CI log for a contributed branch. Version 0.41.0 still follows a symlinked .nvmrc, so deliberate links to another version file keep working, but never prints its content, and accepts it only if it contains a version or the name of an existing alias; the README's bash cdnvm hook, which read .nvmrc itself, now gets the version from nvm, so users of that hook must also update their copy of it.
- Exploitation
- No known exploitation
- EPSS
- 0.18% chance of exploitation in the next 30 days, higher than 4.6% of CVEs
- CVSS
- 6.7 out of 10 · source NVD (7ffcee3d-2c14-4c3e-b844-86c6a321a158)
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Versions
- 0.2.0 → <0.41.0 · fixed in 0.41.0
- Weakness
- CWE-200, CWE-59, CWE-61
- Sources
- CVE.org · NVD · EPSS
- Dates
- published Nov 4, 2026 · first seen here 4 h ago
CVSS score: 4.6 Severity: Medium Identifier: CVE-2026-121749 nvm passes the version pattern to grep without -e, letting a .nvmrc inject grep options and read local files Package: nvm fixed in 0.41.0 Published Published
Node Version Manager (nvm) is a POSIX-compliant shell function for managing multiple node.js versions. In versions 0.5.0 through 0.40.8, the requested version pattern is passed to grep as a bare argument, without -e, in nvm_ls_remote_index_tab, nvm_remote_version, and nvm_ls_cached. A .nvmrc whose first line starts with -, such as -Rohenpm_[A-Za-z0-9]*, is parsed as grep options; with GNU grep, -R searches the current directory recursively (following symlinks) instead of the version list. On a bare nvm install, nvm then treats a matched string from those files as the version, prints it, and requests it from the configured mirror inside download URLs, so for example a repository containing a symlink to ../../.npmrc can leak the user's npm token to the terminal and to the mirror's and any proxy's logs. The disclosure is read-only and limited to the characters 0-9A-Za-z._+-. Version 0.41.0 passes every version pattern to grep with -e.
- Exploitation
- No known exploitation
- EPSS
- 0.17% chance of exploitation in the next 30 days, higher than 3.7% of CVEs
- CVSS
- 4.6 out of 10 · source NVD (7ffcee3d-2c14-4c3e-b844-86c6a321a158)
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Versions
- 0.5.0 → <0.41.0 · fixed in 0.41.0
- Weakness
- CWE-88
- Sources
- CVE.org · NVD · EPSS
- Dates
- published Nov 4, 2026 · first seen here 4 h ago
CVSS score: 2.1 Severity: Low Identifier: CVE-2026-121750 nvm install --offline installs a cached tarball that previously failed checksum verification Package: nvm fixed in 0.41.0 Published Published
Node Version Manager (nvm) is a POSIX-compliant shell function for managing multiple node.js versions. In versions 0.40.5 through 0.40.8, nvm_download_artifact downloads a release archive directly to its final path in $NVM_DIR/.cache and verifies its checksum afterwards; on a checksum mismatch it reports an error but leaves the rejected archive in place. A later nvm install --offline of the same version installs that cached file without a checksum, so an archive that was just rejected gets installed and its node and npm run. This gives code execution to a party who can alter the downloaded tarball (for example a poisoned CDN or cache object) but cannot also forge the SHASUMS256.txt beside it, if the victim runs nvm install --offline for that version after the visible "Checksums do not match" failure and before any online retry. Version 0.41.0 only puts an archive in the cache once its checksum has passed.
- Exploitation
- No known exploitation
- EPSS
- 0.16% chance of exploitation in the next 30 days, higher than 2.9% of CVEs
- CVSS
- 2.1 out of 10 · source NVD (7ffcee3d-2c14-4c3e-b844-86c6a321a158)
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Versions
- 0.40.5 → <0.41.0 · fixed in 0.41.0
- Weakness
- CWE-459, CWE-494
- Sources
- CVE.org · NVD · EPSS
- Dates
- published Nov 4, 2026 · first seen here 4 h ago
CVSS score: 2.1 Severity: Low Identifier: CVE-2026-121751 nvm evaluates a malicious mirror's index.tab version strings as shell arithmetic via stored LTS aliases Package: nvm fixed in 0.41.0 Published Published
Node Version Manager (nvm) is a POSIX-compliant shell function for managing multiple node.js versions. In versions 0.39.6 through 0.40.8, nvm ls-remote (and other commands that refresh remote LTS aliases) store the version column of the mirror's index.tab in $NVM_DIR/alias/lts/ without validating it, and nvm_normalize_lts later evaluates any suffix of an lts/-N value inside shell arithmetic $((N+1)). Under bash and zsh, arithmetic evaluation expands command substitutions in array subscripts, so a stored value such as lts/-10*path[$(cmd)1] runs cmd as the user when the alias is later resolved by purely local commands (nvm ls, nvm alias, nvm use --lts, nvm which lts/), and in every new shell when the default alias is lts/*. Exploitation requires the victim to use a hostile mirror -- via a compromised mirror or CDN, a network man-in-the-middle of an http:// mirror, or a maliciously configured NVM_NODEJS_ORG_MIRROR -- and to run an affected command. The same sink is also reachable from a project .nvmrc, which is treated as hardening. dash is not affected. Version 0.41.0 only passes an all-digit lts/-N offset to arithmetic and drops index.tab rows whose version is not a valid version string.
- Exploitation
- No known exploitation
- EPSS
- 0.27% chance of exploitation in the next 30 days, higher than 11.4% of CVEs
- CVSS
- 2.1 out of 10 · source NVD (7ffcee3d-2c14-4c3e-b844-86c6a321a158)
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Versions
- 0.39.6 → <0.41.0 · fixed in 0.41.0
- Weakness
- CWE-20, CWE-78
- Sources
- CVE.org · NVD · EPSS
- Dates
- published Nov 4, 2026 · first seen here 4 h ago
CVSS score: 2.0 Severity: Low Identifier: CVE-2026-121745 nvm exposes NVM_AUTH_HEADER to other local users on the curl/wget command line Package: nvm fixed in 0.41.0 Published Published
Node Version Manager (nvm) is a POSIX-compliant shell function for managing multiple node.js versions. In versions 0.40.0 through 0.40.8, when NVM_AUTH_HEADER is set, nvm_download passes the credential to curl or wget as a --header "Authorization: ..." command-line argument. Process arguments are visible to every local user (on Linux via ps or /proc//cmdline unless /proc is mounted with hidepid=; on macOS via ps), so another unprivileged account on the same machine can read the token while nvm is downloading during nvm ls-remote, nvm install, and similar commands, and gain whatever access it grants on the private mirror. Only users who set NVM_AUTH_HEADER on a host shared with other local accounts are affected. Version 0.41.0 passes the header to curl on stdin and to GNU Wget in a private temporary config file. BusyBox wget reads no config file, so when it is the only downloader available the header is still passed as an argument.
- Exploitation
- No known exploitation
- EPSS
- 0.13% chance of exploitation in the next 30 days, higher than 1.2% of CVEs
- CVSS
- 2.0 out of 10 · source NVD (7ffcee3d-2c14-4c3e-b844-86c6a321a158)
CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Versions
- 0.40.0 → <0.41.0 · fixed in 0.41.0
- Weakness
- CWE-214
- Sources
- CVE.org · NVD · EPSS
- Dates
- published Nov 4, 2026 · first seen here 4 h ago
CVSS score: 1.8 Severity: Low Identifier: CVE-2026-121748 nvm use --delete-prefix lets a project .npmrc choose which file npm rewrites or makes world-writable Package: nvm fixed in 0.41.0 Published Published
Node Version Manager (nvm) is a POSIX-compliant shell function for managing multiple node.js versions. In versions 0.27.0 through 0.40.8, when a project's .npmrc sets prefix, nvm use tells the user to run nvm use --delete-prefix, which runs npm config delete prefix and npm config delete globalconfig in the current directory without naming a config file. npm loads the project .npmrc before deciding which file to edit, so that file chooses the target: userconfig=~/.bashrc makes npm rewrite ~/.bashrc as ini (corrupting it), and location=global with globalconfig= leaves the chosen file at mode 0666, which on a shared machine lets another local user write to it. The attacker (the author of a cloned repository or archive, or a local user who can write a shared parent directory) chooses the file but not the bytes written, and no project code runs. Version 0.41.0 no longer lets a project .npmrc select which config file --delete-prefix edits.
- Exploitation
- No known exploitation
- EPSS
- 0.13% chance of exploitation in the next 30 days, higher than 1.4% of CVEs
- CVSS
- 1.8 out of 10 · source NVD (7ffcee3d-2c14-4c3e-b844-86c6a321a158)
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Versions
- 0.27.0 → <0.41.0 · fixed in 0.41.0
- Weakness
- CWE-73
- Sources
- CVE.org · NVD · EPSS
- Dates
- published Nov 4, 2026 · first seen here 4 h ago