Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-10796: CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in nvm-sh nvm

0
High
VulnerabilityCVE-2026-10796cvecve-2026-10796cwe-78
Published: Thu Jun 04 2026 (06/04/2026, 17:02:23 UTC)
Source: CVE Database V5
Vendor/Project: nvm-sh
Product: nvm

Description

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.

CVSS v4.0

Score 7.5high

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Active
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 06/04/2026, 18:03:48 UTC

Technical Analysis

The vulnerability in nvm-sh's nvm up to version 0.40.4 involves improper neutralization of special elements in OS commands (CWE-78). Specifically, nvm_download() uses eval on a curl/wget command string constructed from untrusted version strings, allowing command substitution execution. Similarly, nvm_get_checksum() interpolates untrusted version data into an awk program, enabling arbitrary command execution via awk's system(). Attackers who control or manipulate the configured mirror or perform man-in-the-middle attacks on non-TLS mirrors can exploit this to run arbitrary commands as the user running nvm. The default mirror (https://nodejs.org over TLS) is not vulnerable. The issue is fixed on the master branch by eliminating eval usage, passing arguments as literal argv elements, using awk's -v option for data, and validating version strings against the Node.js/io.js version grammar before use.

Potential Impact

Successful exploitation allows an attacker to execute arbitrary OS commands with the privileges of the user running nvm. This can lead to full compromise of the user's environment where nvm is run. The vulnerability requires control over the mirror content or the ability to intercept and modify mirror data on non-TLS connections. The default official mirror over TLS is not affected, reducing risk for users who do not use custom or insecure mirrors.

Mitigation Recommendations

A fix is available on the nvm-sh master branch but has not yet been released in a tagged version. Users should avoid configuring nvm to use non-default or non-TLS mirrors until an official patched release is available. When the patched version is released, users should upgrade promptly. Until then, users should ensure they only use the official Node.js mirror over TLS (https://nodejs.org) to avoid exposure. Patch status is not yet confirmed in a released version — check the vendor's repository for the latest updates and official releases.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
openjs
Date Reserved
2026-06-03T21:17:14.118Z
Cvss Version
4.0
State
PUBLISHED
Remediation Level
null

Threat ID: 6a21ba77e29bf47b50be41ed

Added to database: 6/4/2026, 5:48:39 PM

Last enriched: 6/4/2026, 6:03:48 PM

Last updated: 6/5/2026, 5:02:02 AM

Views: 12

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses