# CVE-2026-52859: Vim out-of-bounds read in update_snapshot function

Source: https://junglewise.ai/threats/cve-2026-52859-vim-out-of-bounds-read-in-update-snapshot-function  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-11. Updated: 2026-06-11  
License: CC BY 4.0 with a link back

CVE-2026-52859 · Severity: info · CVSS 6.9 · Published 2026-06-11

Vim is a widely used open-source text editor. A vulnerability in its terminal emulator component allows a malicious program or script running inside a Vim terminal window to crash the editor. This could lead to a loss of unsaved work or a disruption of operations for users who rely on Vim's built-in terminal features.

Technologies: [Vim](https://junglewise.ai/threats/technologies/vim). Vendors: [Vim](https://junglewise.ai/threats/vendors/vim).

## Quick answers

**Is CVE-2026-52859 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-52859 being exploited in the wild.

**How severe is CVE-2026-52859?** Informational severity, with a CVSS score of 6.9, published 11 June 2026.

**Which products and versions are affected?** Vim < 9.2.0565.

**Is there a fix for CVE-2026-52859?** A patch was published on 2026-05-30: Patch 9.2.0565 released Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-52859 attacked?** It is attacked over the network, in a network appliance.

**Am I affected by CVE-2026-52859?** Check whether you run Vim at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

An out-of-bounds read vulnerability exists in Vim's `update_snapshot()` function within `src/terminal.c`. The function iterates through a cell's `chars[]` array without an upper bound, relying solely on a NUL terminator. When a terminal cell is filled with the maximum allowed characters (one base character and five combining marks), the underlying `libvterm` library returns the array without a NUL terminator. This causes the loop to read past the six-element array and append out-of-bounds data to a fixed-size buffer. An attacker can trigger this by running a program inside a `:terminal` window that outputs a specific byte sequence, resulting in an application crash (DoS). The vulnerability is fixed in version 9.2.0565 by adding a loop guard.

## Affected products

- Vim Vim < 9.2.0565

## Timeline

- 2026-05-30: patched: Patch 9.2.0565 released
- 2026-05-30: advisory: GitHub Security Advisory published
- 2026-06-11: disclosed: CVE published to NVD

## References

- [https://github.com/vim/vim/commit/63680c6d3d52477817b49cd1a66e7aabe8a7aa19](https://github.com/vim/vim/commit/63680c6d3d52477817b49cd1a66e7aabe8a7aa19)
- [https://github.com/vim/vim/releases/tag/v9.2.0565](https://github.com/vim/vim/releases/tag/v9.2.0565)
- [https://github.com/vim/vim/security/advisories/GHSA-47gw-8gc3-mgcm](https://github.com/vim/vim/security/advisories/GHSA-47gw-8gc3-mgcm)

## Related threats

- [Vim is an open source, command line text editor. Prior to 9.2.0845, StructMembers() in runtime/autoload/ccomplete.vim…](https://junglewise.ai/threats/cve-2026-73073-vim-is-an-open-source-command-line-text-editor-prior-to-9-2-0845)
- [Vim netrw code injection via menu construction](https://junglewise.ai/threats/cve-2026-73078-vim-netrw-code-injection-via-menu-construction)
- [Vim shell filetype plugin OS command injection via keyword lookup](https://junglewise.ai/threats/cve-2026-73077-vim-shell-filetype-plugin-os-command-injection-via-keyword-lookup)
- [Vim vimball arbitrary command execution via .VimballRecord](https://junglewise.ai/threats/cve-2026-73076-vim-vimball-arbitrary-command-execution-via-vimballrecord)
- [Vim out-of-bounds access in popup opacity handling](https://junglewise.ai/threats/cve-2026-73075-vim-out-of-bounds-access-in-popup-opacity-handling)
