The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-45130

CVE-2026-45130: Vim Buffer Overflow Vulnerability

CVE-2026-45130 is a heap buffer overflow vulnerability in Vim text editor that allows attackers to exploit crafted spell files. This post covers the technical details, affected versions, impact, and mitigation steps.

Published: May 18, 2026

CVE-2026-45130 Overview

CVE-2026-45130 is a heap buffer overflow [CWE-122] in the read_compound() function in src/spellfile.c of Vim, the open source command line text editor. The vulnerability exists in versions prior to 9.2.0450 when loading a crafted spell file (.spl) with UTF-8 encoding enabled. An attacker-controlled length field in the compound section overflows a 32-bit signed integer multiplication, causing allocation of an undersized buffer that is then written past its boundary. Because the spelllang option can be set from a modeline, opening a text file can trigger spell file loading if a malicious .spl file resides on the runtimepath. The issue has been patched in Vim 9.2.0450.

Critical Impact

Opening an untrusted text file in Vim can lead to heap corruption, application crash, or potential local code execution when a malicious spell file is planted on the runtimepath.

Affected Products

  • Vim text editor versions prior to 9.2.0450
  • Vim installations with UTF-8 encoding active
  • Systems where modeline parsing is enabled (default behavior in many configurations)

Discovery Timeline

  • 2026-05-08 - CVE-2026-45130 published to NVD
  • 2026-05-14 - Openwall OSS Security disclosure post published
  • 2026-05-14 - Last updated in NVD database

Technical Details for CVE-2026-45130

Vulnerability Analysis

The flaw resides in the read_compound() routine within src/spellfile.c, which parses the compound word section of Vim spell files. The function reads a length field directly from the attacker-controlled .spl file and uses it in a 32-bit signed integer multiplication to compute a buffer allocation size. When the supplied length is sufficiently large, the multiplication overflows, wrapping to a small positive value. Vim then allocates an undersized heap buffer, but the subsequent write loop iterates based on the original large length, writing far past the allocated region and corrupting adjacent heap memory.

Exploitation requires user interaction since the victim must open a file in Vim. However, because Vim modelines can set the spelllang option, a benign-looking text file containing a crafted modeline can trigger automatic loading of a malicious spell file placed on the Vim runtimepath. This significantly broadens the attack surface beyond direct invocation of :setlocal spell.

Root Cause

The root cause is missing bounds validation on the COMPOUND section length field before performing arithmetic used for buffer sizing. The fix introduces a hard upper bound (COMPOUND_MAX_LEN set to 100000) that rejects oversized values before allocation occurs, eliminating the integer overflow path.

Attack Vector

The attack is local and requires user interaction. An attacker must place a malicious .spl file on a directory present in Vim's runtimepath and convince the victim to open a text file referencing the corresponding language via modeline or manual configuration. The resulting heap corruption affects confidentiality, integrity, and availability of the Vim process.

c
// Patch from Vim 9.2.0450 - src/spellfile.c
 #define CF_WORD		0x01
 #define CF_UPPER	0x02
 
+// Max allowed length for COMPOUND section
+#define COMPOUND_MAX_LEN	100000
+
 /*
  * Loop through all the siblings of a node (including the node)
  */

Source: GitHub Commit 92993329

c
// Patch from Vim 9.2.0450 - src/version.c (patch number registration)
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    450,
 /**/
     449,
 /**/

Source: GitHub Release v9.2.0450

Detection Methods for CVE-2026-45130

Indicators of Compromise

  • Presence of unexpected .spl files in directories on Vim's runtimepath, particularly in user-writable locations under ~/.vim/spell/ or system spell directories
  • Vim process crashes or abnormal terminations correlated with opening specific text files
  • Text files containing suspicious modelines that set spelllang to non-standard language codes referencing attacker-controlled spell files

Detection Strategies

  • Inventory installed Vim versions across endpoints and flag any build earlier than 9.2.0450
  • Scan user home directories and shared paths for .spl files with recent modification timestamps or unknown provenance
  • Inspect text files transferred from untrusted sources for modeline directives that manipulate spelllang, runtimepath, or related spell options

Monitoring Recommendations

  • Monitor file integrity on Vim runtimepath directories to identify unauthorized creation of spell files
  • Log Vim process crashes via system telemetry and correlate with recently opened files
  • Track creation of .spl files in user-writable directories using endpoint file activity telemetry

How to Mitigate CVE-2026-45130

Immediate Actions Required

  • Upgrade Vim to version 9.2.0450 or later on all systems where the editor is installed
  • Audit Vim runtimepath directories for unauthorized or untrusted .spl files and remove any not installed by trusted package sources
  • Disable modeline parsing in shared or multi-user environments where untrusted text files may be opened

Patch Information

The vulnerability is fixed in Vim 9.2.0450 via commit 92993329178cb1f72d700fff45ca86e1c2d369f8. The patch introduces a COMPOUND_MAX_LEN constant of 100000 that bounds the COMPOUND section length before any size calculation, preventing the integer overflow. Refer to the GitHub Security Advisory GHSA-q4jv-r9gj-6cwv and the Openwall OSS Security Post for vendor details.

Workarounds

  • Disable modelines by adding set nomodeline to ~/.vimrc or /etc/vim/vimrc to prevent automatic spelllang changes from untrusted files
  • Disable spell checking globally with set nospell until patched versions are deployed
  • Restrict write permissions on directories included in Vim's runtimepath to prevent unauthorized placement of malicious .spl files
bash
# Configuration example: vimrc hardening until patch is applied
echo 'set nomodeline' >> ~/.vimrc
echo 'set modelines=0' >> ~/.vimrc
echo 'set nospell' >> ~/.vimrc

# Verify installed Vim version
vim --version | head -n 2

# Audit user-writable spell files on runtimepath
find ~/.vim/spell /usr/share/vim -name '*.spl' -type f -printf '%T@ %p\n' 2>/dev/null | sort -n

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechVim

  • SeverityMEDIUM

  • CVSS Score6.6

  • EPSS Probability0.00%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityLow
  • AvailabilityHigh
  • CWE References
  • CWE-122
  • Technical References
  • GitHub Commit Details

  • GitHub Release Version 9.2.0450

  • GitHub Security Advisory

  • Openwall OSS Security Post
  • Related CVEs
  • CVE-2026-32249: Vim Buffer Overflow Vulnerability

  • CVE-2026-28419: Vim Buffer Overflow Vulnerability

  • CVE-2026-28421: Vim Buffer Overflow Vulnerability

  • CVE-2026-28420: Vim Buffer Overflow Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English