nvm crafted version string may run shell commands

high severity · published 2026-10-29

In affected nvm releases, a version string containing a hash character can break out of a sed address in the installed-versions listing. With GNU sed this may run a shell command as the user, and with BSD sed it may write and read files.

Fixed in: 0.40.6

CVE: CVE-2026-118905

Source: NVD

Am I affected?

You are affected if the installed version is older than 0.40.6. Check the version you have and update to 0.40.6 or later. The fixed version is verified against a vendor or advisory source.

Get the fix

FixLane has a reviewed fix procedure for this incident: a read-only check first, then the fix. Ask the Telegram bot, or connect an AI agent to the FixLane MCP server and call get_fix_prompt with incident id 620 and your operating system.