Skip to main content

Vim CVE-2026-52859

| EUVDEUVD-2026-36283 MEDIUM
Out-of-bounds Read (CWE-125)
2026-06-11 GitHub_M
6.9
CVSS 4.0 · Vendor: GitHub_M
Share

Severity by source

Vendor (GitHub_M) PRIMARY
6.9 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
vuln.today AI
4.2 MEDIUM

Network delivery is plausible via a networked terminal program, but AC:H and UI:R reflect the required precondition of an active :terminal session rendering attacker-controlled combining characters.

3.1 AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:L
4.0 AV:N/AC:H/AT:N/PR:N/UI:P/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N
SUSE
5.0 MEDIUM
AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H
Red Hat
5.0 MEDIUM
qualitative

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
X

Lifecycle Timeline

3
Patch available
Jun 11, 2026 - 20:01 EUVD
Source Code Evidence Fetched
Jun 11, 2026 - 19:31 vuln.today
Analysis Generated
Jun 11, 2026 - 19:31 vuln.today

DescriptionCVE.org

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.

AnalysisAI

Out-of-bounds read in Vim's built-in terminal emulator (:terminal feature) prior to version 9.2.0565 allows a program running inside a :terminal window to crash Vim by outputting crafted Unicode combining characters that exhaust all six libvterm cell slots, causing the unguarded loop in update_snapshot() to walk past the fixed-size array and append out-of-bounds memory into the scrollback buffer. The vulnerability is not listed in CISA's Known Exploited Vulnerabilities catalog and no public exploit code has been identified, placing this in the lower-urgency tier despite the CVSS 4.0 score of 6.9. Real-world exploitation is constrained by the requirement that a victim be actively using Vim's :terminal feature to render attacker-influenced program output.

Technical ContextAI

The vulnerability resides in the update_snapshot() function within src/terminal.c, which copies the visible terminal screen into Vim's scrollback buffer. Vim's :terminal feature embeds the libvterm library to emulate a terminal and represent each screen cell as a struct containing a chars[] array of up to VTERM_MAX_CHARS_PER_CELL (6) Unicode code points - one base character and up to five combining marks. When all six slots are filled, the bundled libvterm returns the array without appending a NUL terminator. The pre-patch iteration loop for (i = 0; (c = cell.chars[i]) > 0 || i == 0; ++i) relied exclusively on a NUL sentinel to halt, so with no NUL present it reads beyond the six-element boundary - a textbook CWE-125 (Out-of-Bounds Read). The out-of-bounds bytes are appended into a buffer sized for only six characters, creating both a crash condition and a theoretical path for adjacent memory disclosure, consistent with the 'Information Disclosure' and 'Buffer Overflow' tags. The fix (commit 63680c6d) adds an explicit upper-bound guard: i < VTERM_MAX_CHARS_PER_CELL. The CPE cpe:2.3:a:vim:vim:*:*:*:*:*:*:*:* indicates all Vim variants across platforms are affected, limited to builds compiled with +terminal support.

RemediationAI

Upgrade Vim to version 9.2.0565 or later, which is confirmed by the vendor release tag at https://github.com/vim/vim/releases/tag/v9.2.0565 and the specific one-line fix in commit 63680c6d3d52477817b49cd1a66e7aabe8a7aa19. If an immediate upgrade is not feasible, the most effective compensating control is to avoid using Vim's :terminal feature with any program that receives or displays externally sourced data - specifically, refrain from running SSH sessions, IRC or chat clients, log-tail utilities, or untrusted scripts inside :terminal. There is no runtime Vim setting or compile-time flag that disables combining-character processing independently of terminal emulation, so feature-level avoidance is the only practical workaround. Package maintainers on distributions that ship Vim should verify their package has been updated to at least 9.2.0565.

More in Vim

View all
CVE-2022-3520 CRITICAL POC
9.8 Dec 02

Heap-based Buffer Overflow in GitHub repository vim/vim prior to 9.0.0765. Rated critical severity (CVSS 9.8), this vuln

CVE-2022-0729 HIGH POC
8.8 Feb 23

Use of Out-of-range Pointer Offset in GitHub repository vim/vim prior to 8.2.4440. Rated high severity (CVSS 8.8), this

CVE-2026-34714 HIGH POC
8.6 Mar 30

Code execution vulnerability in Vim before 9.2.0272 allows attackers to gain immediate arbitrary command execution upon

CVE-2019-12735 HIGH POC
8.6 Jun 05

getchar.c in Vim before 8.1.1365 and Neovim before 0.3.6 allows remote attackers to execute arbitrary OS commands via th

CVE-2021-3968 HIGH POC
8.0 Nov 19

vim is vulnerable to Heap-based Buffer Overflow. Rated high severity (CVSS 8.0), this vulnerability is remotely exploita

CVE-2023-4735 HIGH POC
7.8 Sep 02

Out-of-bounds Write in GitHub repository vim/vim prior to 9.0.1847. Rated high severity (CVSS 7.8), this vulnerability i

CVE-2023-4781 HIGH POC
7.8 Sep 05

Heap-based Buffer Overflow in GitHub repository vim/vim prior to 9.0.1873. Rated high severity (CVSS 7.8), this vulnerab

CVE-2023-4734 HIGH POC
7.8 Sep 02

Integer Overflow or Wraparound in GitHub repository vim/vim prior to 9.0.1846. Rated high severity (CVSS 7.8), this vuln

CVE-2023-4733 HIGH POC
7.8 Sep 04

Use After Free in GitHub repository vim/vim prior to 9.0.1840. Rated high severity (CVSS 7.8), this vulnerability is no

CVE-2023-4750 HIGH POC
7.8 Sep 04

Use After Free in GitHub repository vim/vim prior to 9.0.1857. Rated high severity (CVSS 7.8), this vulnerability is no

CVE-2023-4736 HIGH POC
7.8 Sep 02

Untrusted Search Path in GitHub repository vim/vim prior to 9.0.1833. Rated high severity (CVSS 7.8), this vulnerability

CVE-2023-2610 HIGH POC
7.8 May 09

Integer Overflow or Wraparound in GitHub repository vim/vim prior to 9.0.1532. Rated high severity (CVSS 7.8), this vuln

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SLES15-SP5-CHOST-BYOS-SAP-CCloud Affected
SLES15-SP6-CHOST-BYOS Affected
SLES15-SP6-CHOST-BYOS-Aliyun Affected
SLES15-SP6-CHOST-BYOS-Azure Affected
SLES15-SP6-CHOST-BYOS-EC2 Affected

Share

CVE-2026-52859 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy