Skip to main content

Vim EUVDEUVD-2026-39452

| CVE-2026-55693 MEDIUM
Out-of-bounds Write (CWE-787)
2026-06-25 GitHub_M
5.7
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Craft malicious .spl/.sug file pair with BY_INDEX self-cycle
  2. Delivery
    Deliver files to victim's Vim runtime spell directory
  3. Exploit
    Victim sets spelllang to crafted language with spell enabled
  4. Install
    Victim invokes spell suggestion (z= or spellsuggest())
  5. C2
    .sug load triggers tree_count_words() trie walk
  6. Execute
    Depth counter exceeds MAXWLEN without bounds check
  7. Impact
    Stack OOB write corrupts call frame and crashes editor

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, write limits
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires all of the following conditions to be met simultaneously: (1) a crafted .spl/.sug file pair must be present in a directory on Vim's runtimepath - this is a local filesystem delivery requirement, not a remote network attack; (2) the user must have spell checking enabled (set spell) and must have configured the crafted spell language (set spelllang=<malicious-lang>); (3) the user must actively invoke spell suggestion, either via z= in normal mode or by calling spellsuggest() - merely having the file present or opening a file with spell enabled is insufficient without the suggestion invocation. Exploitation is limited by: the non-default nature of spell file loading from untrusted sources, the requirement for active user interaction to trigger the suggestion code path, and the local attack vector meaning the attacker cannot exploit this remotely over a network. Default Vim installations with no custom spell files loaded are not at risk.

Impact

The CVSS 4.0 score of 5.7 (Medium) reflects the realistic exploitation constraints: local attack vector (AV:L) and mandatory active user interaction (UI:A) substantially reduce exploitability despite the High impact across confidentiality, integrity, and availability on the vulnerable system. The E:U temporal modifier confirms no known public exploit code, and there is no CISA KEV listing indicating active exploitation. EPSS data was not supplied. The theoretical impact of uncontrolled stack corruption is severe - arbitrary code execution is plausible - but the confirmed outcome from the test case is an editor crash (denial of service). From an SSVC perspective: exploitation status = none/PoC-level (test case only), automatable = no (requires file delivery to victim's runtime path and deliberate user action), technical impact = partial (crash confirmed, reliable RCE not demonstrated). The gap between High C/I/A metrics and the Medium overall score is well-explained by the local vector and interaction requirement. This is a genuine priority for users who process untrusted .spl/.sug files but a low-urgency issue for typical interactive Vim users with no untrusted spell files in their runtime.

Exploit ScenarioDerived

An attacker crafts a malicious .spl/.sug file pair containing a BY_INDEX self-referencing node in the fold-word trie that bypasses Vim's parse-time depth cap but drives tree_count_words() to an unbounded depth at runtime. The attacker plants the file pair in the victim's Vim spell directory - for example, via a shared dotfile repository, a compromised plugin manager, or a malicious workspace - and waits for the victim to open a file with spell checking enabled against the crafted language and invoke spell suggestions (via z= or spellsuggest()), at which point the stack out-of-bounds write crashes the editor and may corrupt adjacent stack frames. No independent public exploit code exists, but the upstream commit includes a working test case that reliably reproduces the out-of-bounds write.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 25, 2026

Stack out-of-bounds write in Vim's spell suggestion engine allows a crafted .spl/.sug file pair to corrupt the call stack and crash the editor when spell suggestions are invoked. All Vim releases prior to 9.2.0653 are affected, with the flaw in tree_count_words() and sug_filltree() inside src/spellfile.c, where three fixed-size MAXWLEN-element stack arrays are indexed by an unbounded depth counter. No public exploit identified at time of analysis (CVSS 4.0 E:U), though the upstream fix commit includes a detailed proof-of-concept test case reproducing the out-of-bounds write.

RemediationAI

Upgrade Vim to version 9.2.0653 or later, confirmed by the upstream tagged release at https://github.com/vim/vim/releases/tag/v9.2.0653 and fix commit a80874d9b84a01040e3d1aef2d4a59e1934dafb7 (https://github.com/vim/vim/commit/a80874d9b84a01040e3d1aef2d4a59e1934dafb7). Distribution maintainers should check their package repositories for backported patches. The GitHub Security Advisory is at https://github.com/vim/vim/security/advisories/GHSA-wgh4-64f7-q3jq. Where immediate patching is not feasible, disable spell checking by adding set nospell to ~/.vimrc or the system-wide vimrc; this prevents the .sug file load path entirely, eliminating the attack surface at the cost of losing spell-check functionality. Alternatively, audit and remove any untrusted or unrecognized .spl/.sug files from all directories in Vim's runtimepath (typically ~/.vim/spell/ and /usr/share/vim/vimXX/spell/), restricting spell files to those distributed by the OS vendor.

Affected VersionsENISA

vim < 9.2.0653

Affected Packages

euvd vim fix: 9.2.0653

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability resides in two functions - tree_count_words() and sug_filltree() - within Vim's src/spellfile.c. Both functions walk a spell-file word trie iteratively using a depth counter to index three fixed-size stack arrays: arridx[], curi[], and wordcount[], each dimensioned to MAXWLEN elements. The depth counter was never bounded against MAXWLEN, meaning any trie structure driving descent beyond that limit would write past the end of all three arrays. A specially crafted .spl file can encode a self-referential BY_INDEX node in the fold-word trie: because shared references are not recursed during parsing, Vim's read-time depth cap in read_tree_node() never fires, but the iterative walk in tree_count_words() descends indefinitely. The companion .sug file is required because the vulnerable count walk only executes when spellsuggest() loads the matching suggestion file. The root cause class is CWE-787 (Out-of-bounds Write). Affected CPE is cpe:2.3:a:vim:vim:*:*:*:*:*:*:*:* covering all versions prior to 9.2.0653. The fix adds else if (depth < MAXWLEN - 1) at both vulnerable branch points, making the depth bound explicit.

Know when Vim gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 5.7 MEDIUM
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U
vuln.today AI 7.8 HIGH

Local vector because a crafted spell file must reach the filesystem; no attacker privileges needed but active user interaction (spell suggestion) is required to trigger the vulnerable code path.

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

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Active
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
Patch available
Jun 25, 2026 - 17:02 EUVD

DescriptionCVE.org

Vim is an open source, command line text editor. Prior to 9.2.0653, the tree_count_words() function in src/spellfile.c fills in the word-count fields of a spell-file word trie by walking it iteratively with a depth counter. The counter is bounded only by the trie structure itself; it is never checked against the size of the fixed MAXWLEN-element stack arrays it indexes (arridx[], curi[], wordcount[]). A crafted .spl/.sug file pair, loaded when the user invokes spell suggestion, can drive the descent arbitrarily deep, so the function writes past the end of those arrays. This is a stack out-of-bounds write that corrupts the call frame and crashes the editor. This vulnerability is fixed in 9.2.0653.

Threat Intelligence Overview

EPSS Score
0.1%
Top 97% exploitable
Prevalence
High
widely used text editor across Linux, macOS, and developer environments
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment MSRC Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
High
Technical Impact
Total

Priority Score

28
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +28
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.

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-2022-1616 HIGH POC
7.8 May 07

Use after free in append_command in GitHub repository vim/vim prior to 8.2.4895. Rated high severity (CVSS 7.8), this vu

CVE-2022-1619 HIGH POC
7.8 May 08

Heap-based Buffer Overflow in function cmdline_erase_chars in GitHub repository vim/vim prior to 8.2.4899. Rated high se

CVE-2021-4136 HIGH POC
7.8 Dec 19

vim is vulnerable to Heap-based Buffer Overflow. Rated high severity (CVSS 7.8), this vulnerability is no authentication

CVE-2021-3973 HIGH POC
7.8 Nov 19

vim is vulnerable to Heap-based Buffer Overflow. Rated high severity (CVSS 7.8), this vulnerability is no authentication

CVE-2021-3927 HIGH POC
7.8 Nov 05

vim is vulnerable to Heap-based Buffer Overflow. Rated high severity (CVSS 7.8), this vulnerability is no authentication

CVE-2022-2125 HIGH POC
7.8 Jun 19

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

CVE-2022-2126 HIGH POC
7.8 Jun 19

Out-of-bounds Read in GitHub repository vim/vim prior to 8.2. Rated high severity (CVSS 7.8), this vulnerability is no a

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

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