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-33412

CVE-2026-33412: Vim Text Editor RCE Vulnerability

CVE-2026-33412 is a command injection RCE flaw in Vim's glob() function that enables attackers to execute arbitrary shell commands via newline characters. This article covers technical details, affected versions, and patches.

Published: March 27, 2026

CVE-2026-33412 Overview

CVE-2026-33412 is a command injection vulnerability in Vim, the popular open source command line text editor. Prior to version 9.2.0202, a command injection vulnerability exists in Vim's glob() function on Unix-like systems. By including a newline character (\n) in a pattern passed to glob(), an attacker may be able to execute arbitrary shell commands. The exploitability of this vulnerability depends on the user's shell setting configuration.

Critical Impact

Successful exploitation allows arbitrary shell command execution on Unix-like systems through maliciously crafted input to Vim's glob() function, potentially leading to complete system compromise.

Affected Products

  • Vim versions prior to 9.2.0202
  • Unix-like operating systems running vulnerable Vim installations
  • Systems where Vim's shell setting allows command execution

Discovery Timeline

  • 2026-03-24 - CVE CVE-2026-33412 published to NVD
  • 2026-03-25 - Last updated in NVD database

Technical Details for CVE-2026-33412

Vulnerability Analysis

This command injection vulnerability (CWE-78) affects Vim's glob() function implementation in src/os_unix.c. The vulnerability arises from improper handling of special shell characters, specifically the newline character (\n). When a user passes a pattern containing a newline to the glob() function, the newline can break out of the intended command context and allow execution of arbitrary shell commands.

The attack requires local access and some user interaction, as the malicious pattern must be processed by Vim's glob() function. However, once triggered, the impact is significant as it can lead to unauthorized command execution with the privileges of the Vim process, potentially compromising confidentiality, integrity, and availability of the affected system.

Root Cause

The root cause of this vulnerability lies in the incomplete definition of shell special characters in Vim's SHELL_SPECIAL macro. The original implementation did not include the newline character (\n) in the list of characters that require special handling or escaping when passed to shell commands. This oversight allowed newline characters to be interpreted by the shell as command separators, enabling command injection attacks.

Attack Vector

This is a local attack vector requiring low privileges and user interaction. An attacker must craft a malicious pattern containing a newline character and have it processed by Vim's glob() function. This could occur through:

  1. Opening a maliciously crafted file that triggers glob() with attacker-controlled input
  2. Executing Vim scripts that pass unsanitized user input to glob()
  3. Plugin interactions that invoke glob() with external data

The following patch shows the security fix that adds the newline character to the SHELL_SPECIAL macro:

c
 #  define SEEK_END 2
 # endif
 
-# define SHELL_SPECIAL (char_u *)"\t \"&'$;<>()\\|"
+# define SHELL_SPECIAL (char_u *)"\t \"&'$;<>()\\|\n"
 
     int
mch_expand_wildcards(

Source: GitHub Commit Details

Detection Methods for CVE-2026-33412

Indicators of Compromise

  • Unexpected shell command execution originating from Vim processes
  • Vim process spawning unusual child processes or shells
  • Abnormal patterns in shell history showing commands executed via Vim context
  • Log entries indicating glob operations with newline characters in patterns

Detection Strategies

  • Monitor Vim processes for unexpected child process spawning, particularly shell invocations
  • Implement file integrity monitoring on systems where Vim is commonly used
  • Deploy endpoint detection rules to identify command injection patterns through text editors
  • Review audit logs for suspicious glob() function calls with special characters

Monitoring Recommendations

  • Enable process auditing to track process creation events from Vim
  • Configure SentinelOne Singularity to monitor for suspicious shell command chains originating from editor processes
  • Implement alerting for Vim processes executing commands outside normal operational patterns
  • Monitor for patterns indicative of shell escape attempts in editor contexts

How to Mitigate CVE-2026-33412

Immediate Actions Required

  • Upgrade Vim to version 9.2.0202 or later immediately on all affected systems
  • Review and audit any Vim plugins or scripts that use the glob() function with external input
  • Temporarily restrict Vim's shell setting to a safe value if immediate patching is not possible
  • Implement application allowlisting to prevent unauthorized command execution

Patch Information

The vulnerability has been patched in Vim version 9.2.0202. The fix adds the newline character (\n) to the SHELL_SPECIAL macro, ensuring that newline characters are properly escaped when passed to shell commands. Organizations should update to this version or later as soon as possible.

For detailed patch information, see the GitHub Commit Details and the GitHub Security Advisory.

Workarounds

  • Configure Vim's shell setting to use a more restrictive shell that limits command execution
  • Avoid using glob() with untrusted or user-supplied input in Vim scripts
  • Implement input validation in custom Vim scripts to sanitize patterns before passing to glob()
  • Use SentinelOne's application control features to restrict Vim's ability to spawn arbitrary processes
bash
# Verify Vim version to check if patched
vim --version | head -1

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

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

# Update Vim on macOS via Homebrew
brew upgrade vim

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechVim

  • SeverityHIGH

  • CVSS Score7.3

  • EPSS Probability0.01%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityHigh
  • CWE References
  • CWE-78
  • Technical References
  • GitHub Release v9.2.0202
  • Vendor Resources
  • GitHub Commit Details

  • GitHub Security Advisory

  • Openwall Security Mailing List Post
  • Related CVEs
  • CVE-2026-34714: Vim Editor RCE Vulnerability

  • CVE-2026-28417: Vim Text Editor RCE Vulnerability

  • CVE-2025-27423: Vim Text Editor RCE Vulnerability

  • CVE-2026-32249: 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