製品・ソフトウェアに関する情報
Vimにおける複数の脆弱性
Title Vimにおける複数の脆弱性
Summary

Vimはオープンソースのコマンドラインテキストエディタです。バージョン9.2.0495以前には、netrwプラグイン(runtime/pack/dist/opt/netrw/autoload/netrw.vim)のs:NetrwBookHistSave()にVimscriptコード注入の脆弱性が存在していました。これは、閲覧したディレクトリパスを履歴ファイル~/.vim/.netrwhistにシリアライズする際に発生します。ファイルシステムから取得したディレクトリ名が、埋め込みのシングルクォートをエスケープせずに単一引用符のVimscript文字列リテラルに挿入されるため、細工されたディレクトリ名により文字列の文脈が破られ、任意のVimscriptが実行される可能性があります。その中にはsystem()や:!を介したシェルコマンドの実行も含まれます。履歴ファイルが再度読み込まれた際にこのコードが実行されます。この問題はバージョン9.2.0495で修正されました。

Possible impacts ・当該ソフトウェアが扱う全ての情報が外部に漏れる可能性があります。 ・当該ソフトウェアが扱う全ての情報が書き換えられる可能性があります。 ・当該ソフトウェアが完全に停止する可能性があります。 
Solution

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

Publication Date June 11, 2026, midnight
Registration Date June 15, 2026, 11:16 a.m.
Last Update June 15, 2026, 11:16 a.m.
CVSS3.0 : 重要
Score 8.8
Vector CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Affected System
Vim
Vim 9.2.0495 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
その他
Change Log
No Changed Details Date of change
1 [2026年06月15日]
  掲載
June 15, 2026, 11:16 a.m.

NVD Vulnerability Information
CVE-2026-47162
Summary

Vim is an open source, command line text editor. Prior to version 9.2.0495, a Vimscript code injection vulnerability exists in s:NetrwBookHistSave() in the netrw plugin (runtime/pack/dist/opt/netrw/autoload/netrw.vim) when serializing browsed directory paths to the history file ~/.vim/.netrwhist. A directory name derived from the filesystem is interpolated into a single-quoted Vimscript string literal without escaping embedded single quotes, allowing a crafted directory name to break out of the string context and execute arbitrary Vimscript, including shell commands via system() and :!, the next time the history file is sourced. This issue has been patched in version 9.2.0495.

Publication Date June 12, 2026, 4:16 a.m.
Registration Date June 13, 2026, 4:14 a.m.
Last Update June 13, 2026, 10:04 a.m.
Affected software configurations
Configuration1 or higher or less more than less than
cpe:2.3:a:vim:vim:*:*:*:*:*:*:*:* 9.2.0495
Related information, measures and tools
Common Vulnerabilities List