# CVE-2026-59857: Vim stack out-of-bounds write in spell_soundfold_sal

Source: https://junglewise.ai/threats/cve-2026-59857-vim-stack-out-of-bounds-write-in-spell-soundfold-sal  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-09. Updated: 2026-07-09  
License: CC BY 4.0 with a link back

CVE-2026-59857 · Severity: info · CVSS 5.6 · Published 2026-07-09

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.

Technologies: [Vim](https://junglewise.ai/threats/technologies/vim). Vendors: [Vim](https://junglewise.ai/threats/vendors/vim).

## Quick answers

**Is CVE-2026-59857 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-59857 being exploited in the wild.

**How severe is CVE-2026-59857?** Informational severity, with a CVSS score of 5.6, published 9 July 2026.

**Which products and versions are affected?** Vim < 9.2.0725.

**Is there a fix for CVE-2026-59857?** A patch was published on 2026-07-09: Fix included in Vim patch 9.2.0725 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-59857 attacked?** It is attacked with local access, in a network appliance.

**Am I affected by CVE-2026-59857?** Check whether you run Vim at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## 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

## References

- [https://github.com/vim/vim/commit/d22ff1c955ff87e8273210eae125aab0e85b6c30](https://github.com/vim/vim/commit/d22ff1c955ff87e8273210eae125aab0e85b6c30)
- [https://github.com/vim/vim/security/advisories/GHSA-m3hf-xcm3-xhm2](https://github.com/vim/vim/security/advisories/GHSA-m3hf-xcm3-xhm2)

## Related threats

- [Vim is an open source, command line text editor. Prior to 9.2.0845, StructMembers() in runtime/autoload/ccomplete.vim…](https://junglewise.ai/threats/cve-2026-73073-vim-is-an-open-source-command-line-text-editor-prior-to-9-2-0845)
- [Vim netrw code injection via menu construction](https://junglewise.ai/threats/cve-2026-73078-vim-netrw-code-injection-via-menu-construction)
- [Vim shell filetype plugin OS command injection via keyword lookup](https://junglewise.ai/threats/cve-2026-73077-vim-shell-filetype-plugin-os-command-injection-via-keyword-lookup)
- [Vim vimball arbitrary command execution via .VimballRecord](https://junglewise.ai/threats/cve-2026-73076-vim-vimball-arbitrary-command-execution-via-vimballrecord)
- [Vim out-of-bounds access in popup opacity handling](https://junglewise.ai/threats/cve-2026-73075-vim-out-of-bounds-access-in-popup-opacity-handling)
