Cloudanix VulnDB

CVE-2026-59857

Medium · 5.5

CVSS

5.5

EPSS

0.1%

Published

Jul 9, 2026

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A specially crafted file can make older versions of Vim crash when spell-checking certain text, so users should update Vim.

Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Moderate
Impact
Denial Of Service
Component
Application
Class
Buffer Overflow
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

This is a local, user-triggered stack buffer overflow in Vim's spell-checking sound-folding logic. In versions before 9.2.0725, the single-byte code path in spell_soundfold_sal() can allow the output length counter to reach MAXWLEN and then write a trailing NUL byte one byte beyond a stack buffer. The reachable impact described for the flaw is editor process memory corruption and crash when a boundary-length word is processed through SAL-based spell rules under a non-multibyte 8-bit encoding. The practical security impact is primarily local denial of service of the Vim process rather than reliable code execution.

Why it matters to the business

An attacker who can convince a user to open or process specially crafted text, spell data, or content that triggers Vim spell suggestions may be able to crash the editor and interrupt work. The risk is most relevant for developers, administrators, and operators who use Vim to inspect untrusted files, emails, logs, patches, or repository content. Because the issue is local, requires active user interaction, is not known to be exploited, is not in CISA KEV, and has very low EPSS, it is generally a patch-management priority rather than an emergency response item.

How an attack unfolds

An attacker prepares content intended to be opened or processed in Vim with spell checking and SAL sound-folding active for a single-byte, non-multibyte encoding. The crafted input causes Vim to evaluate a boundary-length word through soundfold() or sound-based spell suggestion logic. In vulnerable versions, spell_soundfold_sal() writes the terminating byte just past the end of a stack buffer, corrupting the surrounding stack frame. The expected outcome is that Vim crashes, potentially causing loss of unsaved edits or interruption of command-line workflows. Exploitation requires local execution context or user-assisted opening of attacker-controlled content; there is no indication from the supplied data of remote unauthenticated exploitation, public exploit maturity, ransomware use, or active KEV-listed exploitation.

How to fix it

Upgrade Vim to version 9.2.0725 or later. Where operating-system packages are used, apply the vendor security update that backports the fix, even if the displayed package version differs from upstream Vim 9.2.0725. If immediate patching is not possible, reduce exposure by avoiding Vim spell checking on untrusted content, avoiding SAL-based spell languages for untrusted files, disabling modelines for untrusted files, and reviewing filetype/plugin automation that may enable spell-related processing automatically. Users should save work frequently when inspecting untrusted text until patched.

How to confirm the fix worked

Confirm that installed Vim builds include the fix by checking the runtime version and patch level with `vim --version` and verifying patch 9.2.0725 or a vendor package changelog that references the fix for CVE-2026-59857. Validate exposure by inventorying endpoints, servers, containers, development images, and administrative jump hosts that include Vim or gVim. Where feasible, confirm that vendor advisories or package metadata show a fixed build installed. For mitigations, verify that spell checking is not automatically enabled for untrusted workflows and that modelines or project-local configuration cannot silently enable risky spell settings.

Typical attack path

  1. Identify a target who uses a vulnerable Vim version before 9.2.0725.
  2. Prepare text or spell-check input that reaches the vulnerable SAL sound-folding path using a boundary-length word.
  3. Ensure conditions favor the vulnerable branch, such as spell checking with a SAL-based spell language under a non-multibyte 8-bit encoding.
  4. Deliver the crafted content through a file, patch, repository, log sample, or other material likely to be opened in Vim.
  5. Wait for the user to open the content or invoke spell-related functionality in Vim.
  6. Trigger the one-byte stack overwrite and crash the Vim process.

How to detect it

To determine whether this may have already been triggered, review endpoint detection telemetry, operating-system crash reports, core dump records, terminal session logs, and application crash logs for Vim or gVim crashes around the time users handled untrusted text. Useful sources include Linux systemd journal entries, apport or ABRT crash reports, macOS DiagnosticReports, Windows Error Reporting for gVim, EDR process crash events, and shell history where available. Look for stack traces, symbols, or crash metadata referencing spell_soundfold_sal(), eval_soundfold(), soundfold(), or src/spell.c. Also review recently opened suspicious files, external patches, cloned repositories, log bundles, and Vim spell-related configuration or spell files in user runtime directories. Absence of these artifacts does not prove non-exploitation because a simple local crash may leave limited telemetry, especially if core dumps are disabled.

  • spell_soundfold_sal
  • eval_soundfold
  • soundfold
  • src/spell.c
  • vim.core
  • core.vim
  • /var/crash/*vim*
  • /var/lib/systemd/coredump/*vim*
  • ~/.vim/spell/
  • spelllang=
  • set spell
  • setlocal spell
  • Vim: Caught deadly signal
  • Process: vim
  • Process: gvim

What your security team should do

  • Patch Vim to 9.2.0725 or the vendor-fixed package across developer workstations, administrator systems, servers, containers, and base images.
  • Prioritize systems where users routinely open untrusted files, patches, logs, source repositories, email attachments, or externally supplied text in Vim.
  • Update golden images, container base images, CI build images, and developer bootstrap scripts so vulnerable Vim versions are not reintroduced.
  • If patching is delayed, communicate interim guidance to avoid using Vim spell checking on untrusted content and to disable modelines for untrusted files.
  • Monitor endpoint crash telemetry and system logs for repeated Vim crashes involving spell_soundfold_sal(), eval_soundfold(), soundfold(), or src/spell.c.
  • Treat this as a medium-severity local denial-of-service issue unless new evidence emerges of reliable code execution or active exploitation.

The record

Vim is an open source, command line text editor. Prior to 9.2.0725, the single-byte branch of spell_soundfold_sal() in src/spell.c translates a word through a spell file's SAL sound-folding rules into a caller-owned result buffer, but its result writes are guarded with reslen < MAXWLEN, allowing reslen to reach MAXWLEN before res[reslen] = NUL writes one byte past the end of the MAXWLEN-element stack buffer. A boundary-length word passed to soundfold(), or reached via sound-based spell suggestion while a SAL-based spell language is active under a non-multibyte 8-bit encoding, can corrupt the eval_soundfold() stack frame and crash the editor. This issue is fixed in version 9.2.0725.

Affected packages

Ecosystem Package Introduced Fixed

Related vulnerabilities