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-2023-4735

CVE-2023-4735: Vim Buffer Overflow Vulnerability

CVE-2023-4735 is an out-of-bounds write buffer overflow vulnerability in Vim text editor that affects versions prior to 9.0.1847. This article covers the technical details, affected versions, security impact, and mitigation.

Published: February 4, 2026

CVE-2023-4735 Overview

CVE-2023-4735 is an out-of-bounds write vulnerability affecting the Vim text editor in versions prior to 9.0.1847. The vulnerability exists in the do_addsub() function within src/ops.c, where insufficient bounds checking during binary number conversion can lead to memory corruption. Successful exploitation requires user interaction, such as opening a maliciously crafted file, but could result in arbitrary code execution with the privileges of the Vim process.

Critical Impact

This out-of-bounds write vulnerability could allow attackers to achieve code execution or cause application crashes through malicious input, affecting both Vim and Apple macOS systems that include the vulnerable Vim component.

Affected Products

  • Vim versions prior to 9.0.1847
  • Apple macOS 14.1

Discovery Timeline

  • 2023-09-02 - CVE-2023-4735 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2023-4735

Vulnerability Analysis

The vulnerability resides in Vim's do_addsub() function, which handles arithmetic operations on numbers within text buffers. Specifically, when converting numbers to binary representation, the code iterates through bits without properly validating the output buffer boundaries. The loop that writes binary digits ('0' or '1') to buf2 lacks an upper bound check against the buffer size (NUMBUFLEN), allowing writes beyond the allocated buffer space when processing specially crafted input values.

This out-of-bounds write (CWE-787) can corrupt adjacent memory regions, potentially overwriting critical data structures or function pointers. An attacker who can control the input processed by this function could leverage this memory corruption to achieve arbitrary code execution within the context of the Vim process.

Root Cause

The root cause is a missing boundary condition check in the binary number conversion loop within do_addsub(). The original code did not validate that the write index i remained within the NUMBUFLEN buffer bounds before writing binary digit characters. This oversight allows the loop to continue writing past the end of buf2 when processing numbers with large binary representations.

Attack Vector

The attack vector requires local access and user interaction. An attacker must convince a user to open a specially crafted file in Vim that triggers the vulnerable code path. The malicious file would contain number values designed to cause the binary conversion loop to exceed the output buffer boundaries. While user interaction is required, the attack does not require authentication or elevated privileges.

c
// Vulnerable code before patch (src/ops.c)
for (i = 0; bit > 0; bit--)
    buf2[i++] = ((n >> (bit - 1)) & 0x1) ? '1' : '0';

// Patched code with bounds checking
for (i = 0; bit > 0 && i < (NUMBUFLEN - 1); bit--)
    buf2[i++] = ((n >> (bit - 1)) & 0x1) ? '1' : '0';

Source: GitHub Vim Commit

Detection Methods for CVE-2023-4735

Indicators of Compromise

  • Unexpected Vim crashes or segmentation faults when opening specific files
  • Anomalous memory access patterns in Vim processes detected by memory protection tools
  • Suspicious files containing unusual numeric sequences designed to trigger arithmetic operations

Detection Strategies

  • Monitor for abnormal Vim process behavior including unexpected crashes or memory access violations
  • Deploy endpoint detection rules to identify exploitation attempts targeting memory corruption in text editors
  • Implement file integrity monitoring to detect potentially malicious files before user interaction

Monitoring Recommendations

  • Enable core dump collection for Vim processes to capture crash artifacts for forensic analysis
  • Configure application-level logging to track file operations and identify suspicious input files
  • Use SentinelOne's behavioral AI to detect post-exploitation activities following memory corruption

How to Mitigate CVE-2023-4735

Immediate Actions Required

  • Update Vim to version 9.0.1847 or later immediately
  • For macOS users, apply the security updates referenced in Apple Support Article HT213984
  • Review systems for potentially malicious files that may have been used in exploitation attempts

Patch Information

The vulnerability has been addressed in Vim version 9.0.1847. The fix adds a boundary check (i < (NUMBUFLEN - 1)) to the binary conversion loop in do_addsub(), preventing writes beyond the allocated buffer. The patch is available via the official Vim GitHub repository. Apple has also addressed this vulnerability in their macOS updates as documented in the Huntr Bounty Report.

Workarounds

  • Avoid opening untrusted files in Vim until the patch is applied
  • Use alternative text editors for handling files from untrusted sources
  • Consider running Vim in sandboxed or restricted environments to limit potential impact
bash
# Verify Vim version to confirm patched status
vim --version | head -1
# Expected: VIM - Vi IMproved 9.0 (patch 1847 or higher)

# Update Vim via package manager (example for apt-based systems)
sudo apt update && sudo apt install vim

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

  • SeverityHIGH

  • CVSS Score7.8

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityHigh
  • CWE References
  • CWE-787
  • Technical References
  • Full Disclosure Mailing List

  • Apple Support Article
  • Vendor Resources
  • GitHub Vim Commit Note

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