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
    • 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-28422

CVE-2026-28422: Vim Buffer Overflow Vulnerability

CVE-2026-28422 is a stack-buffer-overflow vulnerability in Vim text editor that occurs when rendering a statusline with multi-byte characters on wide terminals. This article covers technical details, affected versions, and patches.

Published: March 6, 2026

CVE-2026-28422 Overview

CVE-2026-28422 is a stack buffer overflow vulnerability in Vim, the open source command line text editor. The vulnerability exists in the build_stl_str_hl() function, which is responsible for rendering the statusline. When a statusline is configured with a multi-byte fill character and displayed on a very wide terminal, a stack buffer overflow can occur. The issue has been addressed in Vim version 9.2.0078.

Critical Impact

Local attackers with limited privileges could potentially exploit this vulnerability to cause memory corruption when specific statusline configurations are used on wide terminals, potentially leading to integrity violations.

Affected Products

  • Vim versions prior to 9.2.0078
  • All platforms running vulnerable Vim versions

Discovery Timeline

  • 2026-02-27 - CVE-2026-28422 published to NVD
  • 2026-03-04 - Last updated in NVD database

Technical Details for CVE-2026-28422

Vulnerability Analysis

This vulnerability is classified as CWE-121 (Stack-based Buffer Overflow). The flaw resides in the build_stl_str_hl() function within Vim's buffer handling code. When rendering a statusline with a multi-byte fill character on an exceptionally wide terminal, the code fails to properly account for the byte length of multi-byte characters when calculating the required buffer space.

The vulnerable code path is triggered during statusline rendering operations, where the buffer allocation calculation uses a single-byte assumption for the fill character width. When a multi-byte fill character is used (such as Unicode characters that require multiple bytes to represent), the buffer allocated may be insufficient to hold the expanded output, resulting in a stack buffer overflow.

Root Cause

The root cause stems from an incorrect buffer size calculation in the conditional check within build_stl_str_hl(). The original code calculated the required space using a direct width difference without accounting for multi-byte character encoding. Specifically, when computing whether there is sufficient space in the output buffer, the code failed to multiply the fill width by MB_CHAR2LEN(fillchar) to properly determine the actual byte count needed for multi-byte fill characters.

Attack Vector

Exploitation requires local access to the system with the ability to configure Vim's statusline settings and control the terminal width. An attacker would need to:

  1. Configure a Vim statusline that uses a multi-byte fill character
  2. Launch Vim in a terminal configured with an exceptionally wide display
  3. Trigger the statusline rendering to cause the overflow

The attack complexity is high as it requires specific environmental conditions and user interaction. The vulnerability requires low privileges and user interaction to exploit.

The following patch from the GitHub Commit shows how the vulnerability was fixed:

c
 	}
 	width = maxwidth;
     }
-    else if (width < maxwidth && outputlen + maxwidth - width + 1 < outlen)
+    else if (width < maxwidth &&
+	    outputlen + (maxwidth - width) * MB_CHAR2LEN(fillchar) + 1 < outlen)
     {
 	// Find how many separators there are, which we will use when
 	// figuring out how many groups there are.

Source: GitHub Commit

The fix multiplies the fill width by MB_CHAR2LEN(fillchar) to correctly calculate the byte count needed for multi-byte characters.

Detection Methods for CVE-2026-28422

Indicators of Compromise

  • Unexpected Vim crashes or segmentation faults during statusline rendering
  • Abnormal memory access patterns when using Vim with wide terminals
  • Core dumps or crash logs indicating stack corruption in build_stl_str_hl()

Detection Strategies

  • Monitor for Vim process crashes with stack corruption signatures
  • Implement file integrity monitoring to detect unauthorized Vim binary modifications
  • Audit Vim configurations for unusual statusline settings with multi-byte characters
  • Deploy endpoint detection to identify anomalous memory access patterns

Monitoring Recommendations

  • Enable crash reporting and analyze core dumps for affected Vim processes
  • Monitor system logs for repeated Vim crashes under specific terminal conditions
  • Track Vim version inventory across systems to identify vulnerable installations

How to Mitigate CVE-2026-28422

Immediate Actions Required

  • Update Vim to version 9.2.0078 or later immediately
  • Review and audit statusline configurations in Vim setup files
  • Avoid using multi-byte fill characters in statuslines until patched
  • Consider restricting terminal width if immediate patching is not possible

Patch Information

Vim has released version 9.2.0078 that addresses this vulnerability. The patch modifies the buffer size calculation in build_stl_str_hl() to properly account for multi-byte fill characters.

Patch resources:

  • GitHub Security Advisory GHSA-gmqx-prf2-8mwf
  • GitHub Release v9.2.0078
  • GitHub Commit Update

Workarounds

  • Remove or replace multi-byte fill characters in statusline configurations with single-byte ASCII characters
  • Limit terminal width to prevent triggering the overflow condition
  • Use alternative text editors until patching is complete for sensitive operations
bash
# Check current Vim version
vim --version | head -1

# Update Vim on Debian/Ubuntu systems
sudo apt-get update && sudo apt-get install vim

# Update Vim on RHEL/CentOS systems
sudo yum update vim

# Verify updated version
vim --version | head -1

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

  • SeverityLOW

  • CVSS Score2.2

  • EPSS Probability0.01%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:L/A:N
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityLow
  • AvailabilityNone
  • CWE References
  • CWE-121
  • Technical References
  • GitHub Release v9.2.0078
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Security Advisory GHSA-gmqx-prf2-8mwf

  • Openwall OSS Security List 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
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now 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