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

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

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.