Vimにおける境界外読み取りに関する脆弱性
タイトル Vimにおける境界外読み取りに関する脆弱性
概要

Vimはオープンソースのコマンドラインテキストエディタです。バージョン9.2.0565以前では、src/terminal.c内のupdate_snapshot()関数がスナップショットを取得するときに表示されている端末画面をスクロールバックバッファにコピーしていました。各画面セルごとに、そのchars[]配列を上限なしで走査し、NUL終端子に遭遇した時点で停止します。セルが正当にVTERM_MAX_CHARS_PER_CELL(6)スロットすべてを埋めている場合(基本文字1つと複合マーク5つ)、バンドルされたlibvtermは終端NULなしで配列を返すため、ループは固定の6要素配列の範囲外も読み取り、6文字分しか確保されていないバッファに範囲外の値を追加してしまいます。terminalウィンドウ内で出力がレンダリングされるプログラムは短いバイトシーケンスでこれを引き起こすことができ、Vimスクリプトなしでクラッシュを誘発します。この問題はバージョン9.2.0565で修正されました。

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

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

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

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

Vim is an open source, command line text editor. Prior to version 9.2.0565, the update_snapshot() function in src/terminal.c copies the visible terminal screen into the scrollback buffer when a snapshot is taken. For each screen cell it walks the cell's chars[] array with no upper bound, stopping only when it encounters a NUL terminator. When a cell legitimately fills all VTERM_MAX_CHARS_PER_CELL (6) slots — a base character plus five combining marks — the bundled libvterm returns the array without a terminating NUL, so the loop reads past the fixed six-element array and appends the out-of-bounds values to a buffer reserved for only six characters. A program whose output is rendered inside a :terminal window can trigger this with a short byte sequence and no Vim scripting, leading to a crash. This issue has been patched in version 9.2.0565.

公表日 2026年6月12日4:16
登録日 2026年6月13日4:15
最終更新日 2026年6月15日22:12
影響を受けるソフトウェアの構成
構成1 以上 以下 より上 未満
cpe:2.3:a:vim:vim:*:*:*:*:*:*:*:* 9.2.0565
関連情報、対策とツール
共通脆弱性一覧