Open JS FoundationのNode Version Manager (NVM)におけるOS コマンドインジェクションの脆弱性
タイトル Open JS FoundationのNode Version Manager (NVM)におけるOS コマンドインジェクションの脆弱性
概要

nvm(Node Version Manager)バージョン0.40.4までには、設定されたNode.js/io.jsミラーから提供されるバージョン文字列に含まれる任意のコマンドを実行される脆弱性があります。例えば、`nvm install`コマンドはミラーのindex.tabから利用可能なバージョンを読み取り、選択されたバージョンをサニタイズせずにダウンロードURLやシェル/awkコマンドの構築に使用します。同じ信頼されていない入力が2つの箇所に影響します。nvm_download()関数はcurl/wgetコマンド文字列を生成し、`eval`で実行するため、コマンド置換(例:$(id))を含むバージョンフィールドがローカルシェルによって実行されます。またnvm_get_checksum()関数はバージョン由来のダウンロードスラッグをawkプログラムに挿入するため、細工されたバージョンがawkのsystem()経由で任意のコマンドを実行させます。攻撃者が設定されたミラーを制御し、ユーザーやCIにミラーコンテンツを非デフォルトミラー経由で供給するか、TLSを使用しないミラーで中間者攻撃を行った場合、nvmを実行するユーザーの権限で任意のコマンドを実行できます。デフォルトのミラー(TLS経由のhttps://nodejs.org)は影響を受けません。本問題は、引数をすべてリテラルargv要素としてevalを使わずに渡し、awkに値を-programに埋め込むのではなく-vオプションでデータとして渡し、使用前にNode.js/io.jsのバージョングラムマに沿わないバージョンを拒否することで修正され、masterブランチにて対応済みです(次のタグ付きリリースを待っています)。

想定される影響 ・当該ソフトウェアが扱う全ての情報が外部に漏れる可能性があります。 ・当該ソフトウェアが扱う全ての情報が書き換えられる可能性があります。 ・当該ソフトウェアが完全に停止する可能性があります。 
対策

ベンダ情報を参照して適切な対策を実施してください。

公表日 2026年6月4日0:00
登録日 2026年6月8日11:49
最終更新日 2026年6月8日11:49
CVSS3.0 : 重要
スコア 7.5
ベクター CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
影響を受けるシステム
Open JS Foundation
Node Version Manager (NVM) 0.40.5 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
その他
変更履歴
No 変更内容 変更日
1 [2026年06月08日]
  掲載
2026年6月8日11:49

NVD脆弱性情報
CVE-2026-10796
概要

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.

公表日 2026年6月5日3:16
登録日 2026年6月5日4:11
最終更新日 2026年6月5日3:16
関連情報、対策とツール
共通脆弱性一覧