CVE-2026-118905
Description
A flaw was found in nvm. Improper input sanitization when filtering version strings allows injected commands to be processed by the underlying stream editor (sed). A local attacker can exploit this vulnerability by enticing a user to process an untrusted version string—such as through a directory containing a malicious configuration file (.nvmrc)—leading to arbitrary code execution or unauthorized file access with the privileges of the victim.
Statement
This vulnerability is rated Moderate because exploitation requires local user interaction and specific shell integration configurations to trigger malicious command execution. Red Hat products do not ship the Node Version Manager (nvm) tool, providing Node.js runtimes directly through official platform repositories instead. Furthermore, standard execution does not automatically evaluate unparsed configuration files, and any potential command execution remains strictly confined to the permissions of the local invoking user.
Understanding the Weakness (CWE)
Access Control
Technical Impact: Bypass Protection Mechanism
In some cases, injectable code controls authentication; this may lead to a remote vulnerability.
Access Control
Technical Impact: Gain Privileges or Assume Identity
Injected code can access resources that the attacker is directly prevented from accessing.
Integrity,Confidentiality,Availability
Technical Impact: Execute Unauthorized Code or Commands
When a product allows a user's input to contain code syntax, it might be possible for an attacker to craft the code in such a way that it will alter the intended control flow of the product. As a result, code injection can often result in the execution of arbitrary code. Code injection attacks can also lead to loss of data integrity in nearly all cases, since the control-plane data injected is always incidental to data recall or writing.
Non-Repudiation
Technical Impact: Hide Activities
Often the actions performed by injected control code are unlogged.
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.