Executive brief
Vim is a widely used open-source text editor. A vulnerability in its spell-checking feature could allow a specially crafted word or spell file to crash the application. This occurs when the editor attempts to process certain words using specific language rules, potentially leading to a loss of unsaved work or a service disruption for users relying on the editor in automated environments.
Technical details
An off-by-one stack-based out-of-bounds write exists in the `spell_soundfold_sal()` function within `src/spell.c`. The vulnerability occurs in the single-byte branch (used for 8-bit encodings like latin1) where result writes are guarded by `reslen < MAXWLEN`. This allows `reslen` to reach the value of `MAXWLEN`, causing the subsequent NUL-terminator assignment `res[reslen] = NUL` to write one byte past the end of the `MAXWLEN`-sized stack buffer. An attacker can trigger this by passing a boundary-length word to the `soundfold()` function or through sound-based spell suggestions when a SAL-based spell language is active. This results in stack frame corruption and a process crash. The issue is fixed in version 9.2.0725.
Affected products
- Vim Vim < 9.2.0725
Timeline
- 2026-06-24: advisory: GitHub Security Advisory published
- 2026-07-09: disclosed: CVE published to NVD
- 2026-07-09: patched: Fix included in Vim patch 9.2.0725