CVE-2026-52859 Details
Description
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.
A vulnerability allowing an out-of-bounds read has been identified in Vim versions prior to 9.2.0565. The issue arises in the 'update_snapshot()' function within 'src/terminal.c', where the function copies the visible terminal screen into the scrollback buffer. The vulnerability occurs because the function iterates over the 'chars[]' array of each screen cell without an upper limit, only stopping at a NUL terminator. When a cell fills all six character slots (a base character plus five combining marks), the array is returned without a terminating NUL, leading the function to read past the end of the fixed-size array. This out-of-bounds read appends attacker-controlled values to a buffer designed for only six characters, causing a crash. The vulnerability can be triggered by a program outputting a short byte sequence in a ':terminal' window, without the need for Vim scripting.
Users can update to Vim version 9.2.0565 or later, where this vulnerability has been fixed.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jun 11, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-125 | Out-of-bounds Read | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| vim vim | < 9.2.0565 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jun 15, 2026 | Initial Analysis | [email protected] |
| Jun 11, 2026 | New CVE Received | [email protected] |