CVE-2026-118905
Last modified
CVE-2026-118905 is a high-severity vulnerability rated 7/10 on the CVSS scale. 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. EPSS estimates a 0.14% chance of exploitation in the next 30 days.
Description
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.
Metrics
Weakness Enumeration
Affected Software
Source: CNA advisory (CVE.org). NVD analysis pending.
| Vendor | Product | Versions |
|---|---|---|
| nvm-sh | nvm | >= 0.31.2, < 0.40.6 |
References
Timeline
- Published
- Last Modified
- Status
- Awaiting Analysis
Frequently Asked Questions
What is CVE-2026-118905?
How severe is CVE-2026-118905?
How do I fix CVE-2026-118905?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2026
- CVE-2026-11885IBM PowerVM Hypervisor FW1110.00 through FW1110.20, FW1060.0…8.4
- CVE-2026-11887The Salon Booking System WordPress plugin before 10.30.20 d…4.3
- CVE-2026-11888IBM Security Verify Access 10.0 through 10.0.9.2 and IBM Ver…7.5
- CVE-2026-11889SALTO ProAccess Space software using the tenancy feature / l…6.5
- CVE-2026-1189The LeadBI Plugin for WordPress plugin for WordPress is vuln…6.4
- CVE-2026-11890Improper access control in PAM account discovery results in …4.3
- CVE-2026-11891Use After Free vulnerability in Arm Ltd Valhall GPU Userspac…5.1
- CVE-2026-11893The Bluetooth HCI driver for Bouffalo Lab on-chip BLE contro…5.9
- CVE-2026-118938In Trail of Bits fickling through 0.1.12, a pickle STACK_GLO…8.8
- CVE-2026-11894The Realtek BEE Bluetooth HCI driver's send callback, bt_hci…5.9
- CVE-2026-118947A flaw was found in the UMA resource registration endpoint o…4.3
- CVE-2026-11895The HT Mega Addons for Elementor – Elementor Widgets & Templ…6.4
Are you affected by CVE-2026-118905?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
