# CVE-2026-45130: Vim heap buffer overflow in spell file loading

Source: https://junglewise.ai/threats/cve-2026-45130-vim-heap-buffer-overflow-in-spell-file-loading  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-05-08. Updated: 2026-05-18  
License: CC BY 4.0 with a link back

CVE-2026-45130 · Severity: medium · CVSS 6.6 · Published 2026-05-08

Vim is a widely used open-source text editor. A vulnerability in how it handles spell-check files could allow an attacker to crash the application. This can be triggered automatically if a user opens a text file containing a malicious configuration line (modeline) while a specially crafted spell file is present on the system.

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

## Quick answers

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

**How severe is CVE-2026-45130?** Medium severity, with a CVSS score of 6.6, published 8 May 2026.

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

**Is there a fix for CVE-2026-45130?** A patch was published on 2026-05-07: Patch 9.2.0450 released Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-45130 attacked?** It is attacked with local access, in an operating system.

**Am I affected by CVE-2026-45130?** 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

A heap-based buffer overflow exists in the read_compound() function within src/spellfile.c. The vulnerability is caused by an integer overflow when calculating the buffer size for a regex pattern; specifically, an attacker-controlled 'sectionlen' field triggers a 32-bit signed integer multiplication wrap-around when UTF-8 encoding is active. This results in a small memory allocation (e.g., 27 bytes) followed by a loop that attempts to write approximately 1 billion bytes, leading to a heap overflow. An attacker can trigger this by planting a malicious .spl file in the runtime path and using a 'modeline' in a text file to set 'spelllang', forcing Vim to load the crafted file. The issue is fixed in version 9.2.0450 by using size_t for calculations and implementing a maximum length check (COMPOUND_MAX_LEN).

## Affected products

- Vim Vim < 9.2.0450

## Timeline

- 2026-05-07: advisory: GitHub Security Advisory published
- 2026-05-07: patched: Patch 9.2.0450 released
- 2026-05-08: disclosed: NVD publication date
- 2026-05-14: other: CVE ID confirmed on oss-security mailing list

## References

- [https://github.com/vim/vim/commit/92993329178cb1f72d700fff45ca86e1c2d369f8](https://github.com/vim/vim/commit/92993329178cb1f72d700fff45ca86e1c2d369f8)
- [https://github.com/vim/vim/releases/tag/v9.2.0450](https://github.com/vim/vim/releases/tag/v9.2.0450)
- [https://github.com/vim/vim/security/advisories/GHSA-q4jv-r9gj-6cwv](https://github.com/vim/vim/security/advisories/GHSA-q4jv-r9gj-6cwv)
- [http://www.openwall.com/lists/oss-security/2026/05/14/3](http://www.openwall.com/lists/oss-security/2026/05/14/3)

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