CVE-2026-57455: Vim Spell-Check Stack Buffer Overflow – Patch to 9.2.0698
Vim versions before 9.2.0698 contain a stack buffer overflow in spell-checking functionality. When processing words longer than Vim's internal buffer limit (MAXWLEN) with certain spell file configurations, the editor writes data beyond allocated memory, corrupting the program's call stack and causing a crash. An attacker can trigger this by crafting a malicious spell file or providing oversized words during spell-checking operations, though the immediate impact is denial of service rather than code execution.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.8 HIGH · CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- Weaknesses (CWE)
- CWE-787
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-25 / 2026-06-26
NVD description (verbatim)
Vim is an open source, command line text editor. Prior to 9.2.0698, the single-byte branch of spell_soundfold_sofo() in src/spell.c translates a word through a spell file's SOFO (sound-folding) byte map into a caller-owned result buffer. Its copy loop advances the output index ri with no upper bound and terminates only on the input NUL, writing one byte per input byte into the MAXWLEN-element stack buffer the caller provides. A word longer than MAXWLEN, passed to soundfold() (or reached via sound-based spell suggestion) while a SOFO-based spell language is active, therefore writes past the end of that buffer. This is a stack out-of-bounds write that corrupts the call frame and crashes the editor. This vulnerability is fixed in 9.2.0698.
3 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability exists in the spell_soundfold_sofo() function within src/spell.c, specifically in the single-byte branch that performs sound-folding transformations using a SOFO (sound-folding) byte map from spell files. The vulnerable code copies input bytes into a caller-provided stack buffer (size MAXWLEN) without validating the output index ri against bounds; the loop terminates only upon encountering a NUL terminator in the input stream. Words exceeding MAXWLEN length trigger unbounded writes past the stack buffer's end. This stack corruption corrupts the call frame, typically resulting in process termination. The vulnerability is classified as CWE-787 (out-of-bounds write).
Business impact
Vim users face service disruption when the editor crashes due to maliciously crafted spell files or excessively long words in spell-checking contexts. While the immediate risk is denial of service, stack corruption could theoretically provide a vector for privilege escalation or code execution if exploited with precision; however, the practical exploitation complexity is high and crashes are the primary observed outcome. Organizations relying on Vim for critical text editing workflows should prioritize patching to prevent unexpected editor crashes.
Affected systems
Vim versions prior to 9.2.0698 are affected. The vulnerability is triggered when spell-checking is active with a SOFO-based spell language loaded. Desktop and server environments running vulnerable Vim versions are at risk, particularly those with locally-accessible spell file directories or users who open untrusted documents with spell-checking enabled.
Exploitability
Exploitation requires local access and user interaction—an attacker must either provide a malicious spell file in a location Vim searches, or trick a user into opening a document containing an oversized word while spell-checking is active. The attack surface is moderate: spell-checking is a standard feature but often remains dormant unless explicitly invoked or configured. No network vector exists; this is strictly a local vulnerability requiring UI interaction to trigger.
Remediation
Update Vim to version 9.2.0698 or later. Verify the patch version against the official Vim release notes and security advisories. Until patching is complete, users can reduce risk by disabling spell-checking in untrusted contexts or restricting write access to spell file directories.
Patch guidance
Apply Vim version 9.2.0698 or later. Consult vim.org's official release notes and your distribution's package manager to confirm the exact patched version available in your environment. If using a distribution package, check the package changelog to ensure the fix is included. For source builds, pull from the official repository and verify the commit hash against the security advisory.
Detection guidance
Monitor for Vim crashes correlated with spell-checking activity, particularly when processing documents with unusually long words or after spell file modifications. Log spell-checking errors or warnings. Check running Vim processes and confirm they are running version 9.2.0698 or later using 'vim --version'. Audit spell file directories for unexpected or modified .spl files, which may indicate an attempt to deliver a malicious spell file.
Why prioritize this
With a CVSS 3.1 score of 7.8 (HIGH) reflecting high impact on confidentiality, integrity, and availability, this vulnerability merits prompt patching. Although not currently in the KEV catalog and requiring local access, the combination of stack corruption, user-facing denial of service, and the ubiquity of Vim in development and system administration roles justifies elevated priority. Organizations should patch within standard maintenance windows.
Risk score, explained
The CVSS 3.1 score of 7.8 reflects a local attack vector (AV:L), low attack complexity (AC:L), no privilege requirement (PR:N), and user interaction requirement (UI:R). The impact ratings—high for confidentiality, integrity, and availability (C:H/I:H/A:H)—reflect the severity of stack corruption and process crash. The score appropriately captures the risk of denial of service and potential (though difficult) privilege escalation via stack corruption.
Frequently asked questions
Can this vulnerability be exploited remotely?
No. CVE-2026-57455 requires local access and user interaction. An attacker cannot exploit this over a network; they must either place a malicious spell file on the target system or socially engineer a user into opening a document containing an oversized word during spell-checking.
What is the primary impact of exploitation?
The primary impact is denial of service—Vim crashes when the buffer overflow occurs. While stack corruption could theoretically enable privilege escalation or code execution, the practical exploitation path is complex, and observed attacks typically result in editor termination rather than arbitrary code execution.
Do I need to disable spell-checking to stay safe?
Disabling spell-checking reduces attack surface, but it is not necessary if you update to Vim 9.2.0698 or later. For users unable to patch immediately, disabling spell-checking in contexts where you open untrusted documents is a reasonable interim mitigation.
How do I verify my Vim version is patched?
Run 'vim --version' from the command line and check the version number. It should be 9.2.0698 or later. If you installed Vim via a package manager, verify the installed package version matches or exceeds the patched release for your distribution.
This analysis is provided for informational purposes and does not constitute professional security advice. Verify all patch versions, affected product lists, and CVE details against official vendor advisories and the National Vulnerability Database before taking action. SEC.co does not guarantee the accuracy of third-party vendor statements or patch availability timelines. Organizations should conduct their own risk assessment and testing before deploying patches in production environments. No exploit code or weaponized proof-of-concept details are included in this analysis. Source: NVD (public-domain), retrieved 2026-08-03. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-55693HIGHVim Spell-File Stack Buffer Overflow Vulnerability
- CVE-2026-55892MEDIUMVim Spell-File Stack Buffer Overflow DoS Vulnerability
- CVE-2020-9695HIGHAdobe Acrobat Reader Out-of-Bounds Write RCE Vulnerability
- CVE-2021-4478HIGHDräger CC-Vision Buffer Overflow in .gdt File Parsing
- CVE-2025-14098HIGHAvira Antivirus Engine Heap Buffer Overflow—Patch Guidance
- CVE-2025-59605HIGHQualcomm Memory Corruption in Device Identifier Processing
- CVE-2025-7004HIGHHeap Buffer Overflow in Avast, AVG, Norton Antivirus – Gen Digital Definition Update Fix
- CVE-2026-0138HIGHAndroid LWIS Buffer Overflow Leading to Local Privilege Escalation