Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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-2024-43790

CVE-2024-43790: Vim Buffer Overflow Vulnerability

CVE-2024-43790 is a buffer overflow vulnerability in Vim text editor triggered during search operations in right-left mode. This article covers the technical details, affected versions, security impact, and mitigation.

Updated: January 22, 2026

CVE-2024-43790 Overview

CVE-2024-43790 is a heap-based buffer overflow vulnerability in the Vim text editor that occurs when handling search patterns containing ASCII NUL characters while right-left mode is enabled. The flaw exists in the do_search() function and can be triggered when displaying search-count messages is disabled (:set shm+=S) and right-left mode is active (:set rl).

When performing a search under these conditions, Vim allocates a new buffer for the reversed search pattern. However, if the search pattern contains embedded NUL bytes, the strlen() function used to determine the buffer size terminates prematurely at the first NUL byte. This results in an undersized buffer allocation while the original length indicator remains incorrect, leading to a heap-based buffer overflow when accessing characters in the message buffer.

Critical Impact

Local attackers can exploit this vulnerability to cause a denial of service condition through application crashes. The vulnerability requires local access and user interaction with a maliciously crafted search pattern.

Affected Products

  • Vim versions prior to v9.1.0689
  • NetApp Bootstrap OS
  • NetApp HCI Compute Node

Discovery Timeline

  • 2024-08-22 - CVE-2024-43790 published to NVD
  • 2025-08-18 - Last updated in NVD database

Technical Details for CVE-2024-43790

Vulnerability Analysis

This vulnerability is classified as CWE-122 (Heap-based Buffer Overflow). The root issue lies in the inconsistent buffer length calculation when reversing search patterns containing embedded NUL characters in right-left mode.

When a user performs a search with :set rl enabled and :set shm+=S configured, Vim reverses the search pattern for display in the message buffer (msgbuf). The reversal process allocates a new buffer using strlen() to determine the required size. However, strlen() only counts characters until it encounters the first NUL byte, causing the allocated buffer to be smaller than necessary when the original pattern contains embedded NUL characters.

The msgbuflen variable, which tracks the buffer length, is not updated after the new allocation. Subsequent operations that access the message buffer use the original (now incorrect) length value, resulting in out-of-bounds memory access.

Root Cause

The vulnerability stems from a missing length recalculation after buffer reallocation. When the search pattern is reversed for right-left mode display, a new buffer is allocated but the msgbuflen variable retains the original buffer's length value. This mismatch causes heap-based buffer overflow when the code attempts to access characters beyond the actual allocated buffer size.

Attack Vector

This vulnerability requires local access to the system running Vim. An attacker must be able to:

  1. Configure Vim with right-left mode enabled (:set rl)
  2. Disable search-count message display (:set shm+=S)
  3. Execute a search operation with a pattern containing embedded NUL bytes

The attack vector is local, requiring low privileges and no user interaction beyond the search operation itself. Successful exploitation results in application crash causing denial of service.

The official patch addresses this by updating the msgbuflen variable after buffer reallocation:

c
 			{
 			    vim_free(msgbuf);
 			    msgbuf = r;
+			    msgbuflen = STRLEN(msgbuf);
 			    // move reversed text to beginning of buffer
 			    while (*r != NUL && *r == ' ')
 				r++;

Source: GitHub Commit

Detection Methods for CVE-2024-43790

Indicators of Compromise

  • Unexpected Vim crashes during search operations
  • Core dump files indicating heap corruption in Vim processes
  • Vim processes terminating with segmentation faults when right-left mode is active
  • Anomalous memory access patterns in Vim process logs

Detection Strategies

  • Monitor for repeated Vim process crashes with heap-related error signatures
  • Implement endpoint detection rules for Vim processes experiencing memory corruption
  • Deploy application crash monitoring to detect exploitation attempts
  • Review system logs for Vim segmentation faults during search operations

Monitoring Recommendations

  • Enable crash reporting for Vim processes across managed endpoints
  • Monitor for unusual Vim configuration changes enabling right-left mode
  • Track Vim version deployments to identify unpatched instances
  • Implement file integrity monitoring on Vim binaries to detect unauthorized modifications

How to Mitigate CVE-2024-43790

Immediate Actions Required

  • Upgrade Vim to version 9.1.0689 or later immediately
  • Review and inventory all systems running vulnerable Vim versions
  • Consider temporarily disabling right-left mode (:set norl) on critical systems until patching is complete
  • Apply vendor-provided patches for NetApp Bootstrap OS and HCI Compute Node deployments

Patch Information

The vulnerability has been fixed in Vim patch v9.1.0689. The fix ensures that msgbuflen is properly updated after buffer reallocation when reversing search patterns. Organizations should update Vim through their standard package management systems or compile from the latest source.

For detailed patch information, refer to the GitHub Security Advisory and the GitHub Commit.

NetApp users should consult the NetApp Advisory NTAP-20240920-0005 for specific guidance on affected products.

Workarounds

  • Disable right-left mode by adding set norl to your .vimrc configuration
  • Enable search-count messages by removing S from the shortmess option
  • Use alternative text editors for operations requiring right-left text display until patching is possible
  • Restrict access to Vim on shared systems where untrusted users may trigger vulnerable code paths
bash
# Configuration to mitigate the vulnerability
# Add to ~/.vimrc or /etc/vimrc
set norl
" Or ensure search count messages are displayed
set shortmess-=S

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

  • EPSS Probability0.06%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-122
  • Technical References
  • NetApp Advisory NTAP-20240920-0005
  • Vendor Resources
  • GitHub Commit Changes

  • GitHub Security Advisory
  • 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 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