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
    • 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-2023-1170

CVE-2023-1170: Vim Buffer Overflow Vulnerability

CVE-2023-1170 is a heap-based buffer overflow vulnerability in Vim that affects versions prior to 9.0.1376. Attackers can exploit this flaw to cause crashes or execute malicious code. This article covers technical details, affected versions, impact assessment, and mitigation strategies.

Published: February 4, 2026

CVE-2023-1170 Overview

CVE-2023-1170 is a heap-based buffer overflow vulnerability affecting the Vim text editor in versions prior to 9.0.1376. This memory corruption flaw occurs when performing a put operation in Visual block mode, leading to invalid memory access. Successful exploitation requires local access and user interaction but can result in application crashes, denial of service, and potential compromise of system integrity.

Critical Impact

This heap-based buffer overflow can cause Vim to crash or potentially allow attackers to corrupt memory, leading to denial of service and possible arbitrary code execution in the context of the affected user.

Affected Products

  • Vim versions prior to 9.0.1376
  • Linux distributions shipping vulnerable Vim packages (including Fedora)
  • Any system with Vim installed from source prior to the security patch

Discovery Timeline

  • 2023-03-03 - CVE-2023-1170 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2023-1170

Vulnerability Analysis

This vulnerability is classified as CWE-122 (Heap-based Buffer Overflow). The flaw exists in Vim's register handling code within src/register.c, specifically in the logic that processes trailing spaces during Visual block mode put operations. When a user performs a paste (put) operation in Visual block mode, the code responsible for inserting trailing spaces fails to properly validate the spaces variable before using it in memory operations.

The vulnerability allows invalid memory access because the condition checking for trailing spaces (if ((j < count - 1 || !shortline) && spaces)) does not adequately verify that the spaces value is positive. When spaces contains an unexpected value, the subsequent vim_memset() call can write to unintended memory locations on the heap, corrupting adjacent memory structures.

Root Cause

The root cause lies in insufficient validation of the spaces variable in the register handling code. The original conditional check && spaces was intended to verify that spaces needed to be inserted, but this check is inadequate because it only tests for non-zero values without ensuring the value is positive. A negative or corrupted spaces value could pass this check and cause the vim_memset() function to operate on an incorrect memory size, resulting in heap corruption.

Attack Vector

Exploitation of this vulnerability requires local access to the system and user interaction. An attacker would need to craft a malicious file or sequence of operations that, when opened and manipulated in Vim using Visual block mode paste operations, triggers the buffer overflow condition. The attack vector involves:

  1. Preparing content that creates specific conditions in Vim's internal register state
  2. Convincing a user to open the crafted content in Vim
  3. Having the user perform a Visual block mode paste operation that triggers the vulnerable code path
c
// Security patch from src/register.c
// Source: https://github.com/vim/vim/commit/1c73b65229c25e3c1fd8824ba958f7cc4d604f9c

 		ptr += yanklen;
 
 		// insert block's trailing spaces only if there's text behind
-		if ((j < count - 1 || !shortline) && spaces)
+		if ((j < count - 1 || !shortline) && spaces > 0)
 		{
 		    vim_memset(ptr, ' ', (size_t)spaces);
 		    ptr += spaces;

The fix changes the condition from && spaces to && spaces > 0, ensuring that the vim_memset() operation only executes when the spaces variable contains a valid positive value.

Detection Methods for CVE-2023-1170

Indicators of Compromise

  • Unexpected Vim crashes when performing paste operations in Visual block mode
  • Core dumps or segmentation faults associated with the Vim process
  • Memory corruption errors in system logs related to Vim execution
  • Unusual process behavior or child processes spawned from Vim sessions

Detection Strategies

  • Monitor for Vim process crashes, particularly segmentation faults or abort signals
  • Implement file integrity monitoring on Vim binary and configuration files
  • Deploy endpoint detection rules for anomalous memory access patterns in text editors
  • Review system logs for repeated Vim crash events with similar patterns

Monitoring Recommendations

  • Enable crash reporting and core dump collection for forensic analysis
  • Configure SentinelOne to monitor for heap corruption indicators in Vim processes
  • Set up alerts for multiple Vim crashes from the same user account in short time periods
  • Monitor for suspicious files with unusual content being opened in Vim

How to Mitigate CVE-2023-1170

Immediate Actions Required

  • Update Vim to version 9.0.1376 or later immediately
  • Apply vendor-provided security patches from your Linux distribution
  • Review systems for vulnerable Vim installations using package managers
  • Consider temporarily restricting Vim usage on critical systems until patched

Patch Information

The vulnerability has been addressed in Vim version 9.0.1376. The security patch is available through the official Vim GitHub repository commit. Linux distributions including Fedora have released updated packages addressing this vulnerability, as noted in their package announcements.

Additional details about the vulnerability discovery and patch can be found on the Huntr bounty page.

Workarounds

  • Avoid using Visual block mode paste operations until the patch is applied
  • Consider using alternative text editors for critical operations on unpatched systems
  • Implement application whitelisting to restrict Vim execution to trusted users
  • Deploy additional memory protection mechanisms such as ASLR and heap hardening
bash
# Check current Vim version
vim --version | head -1

# Update Vim on Fedora/RHEL-based systems
sudo dnf update vim-enhanced vim-common

# Update Vim on Debian/Ubuntu-based systems
sudo apt update && sudo apt upgrade vim

# Build from source with the security patch
git clone https://github.com/vim/vim.git
cd vim
git checkout v9.0.1376
./configure && make && sudo make install

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

  • 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
  • Fedora Package Announce

  • Fedora Package Announce

  • Fedora Package Announce
  • Vendor Resources
  • GitHub Commit Change

  • Huntr Bounty Listing
  • 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