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

CVE-2026-26268: Anysphere Cursor Sandbox Escape RCE Flaw

CVE-2026-26268 is a sandbox escape RCE vulnerability in Anysphere Cursor allowing malicious agents to write Git hooks for remote code execution. This article covers technical details, affected versions, and mitigation.

Published: February 20, 2026

CVE-2026-26268 Overview

CVE-2026-26268 is a critical sandbox escape vulnerability affecting Cursor, a code editor built for programming with AI. The vulnerability allows a malicious agent (via prompt injection) to write to improperly protected .git settings, including git hooks, which can lead to out-of-sandbox remote code execution when these hooks are automatically triggered by Git operations.

This vulnerability is classified as CWE-862 (Missing Authorization), as the application failed to properly restrict write access to sensitive .git configuration files within its sandbox environment. The flaw enables attackers to achieve code execution outside the intended sandbox without any user interaction.

Critical Impact

Attackers can achieve out-of-sandbox remote code execution through malicious prompt injection targeting Git configuration files, with no user interaction required.

Affected Products

  • Anysphere Cursor versions prior to 2.5

Discovery Timeline

  • 2026-02-13 - CVE CVE-2026-26268 published to NVD
  • 2026-02-18 - Last updated in NVD database

Technical Details for CVE-2026-26268

Vulnerability Analysis

This vulnerability stems from insufficient access controls within Cursor's sandbox implementation. The AI-powered code editor failed to properly protect .git directory configurations, allowing write operations to sensitive files that should have been restricted.

The critical weakness lies in the sandbox's inability to prevent modifications to Git hooks—executable scripts that Git runs automatically in response to certain events such as commits, pushes, or merges. When a malicious AI agent (via prompt injection) writes to these hook files, the attacker-controlled code executes the next time the corresponding Git operation is triggered, effectively escaping the sandbox environment.

Root Cause

The root cause is missing authorization checks (CWE-862) on file write operations targeting the .git directory within Cursor's sandboxed environment. The application did not validate or restrict access to sensitive Git configuration paths, allowing unrestricted modification of files including:

  • .git/hooks/ directory (pre-commit, post-commit, pre-push, etc.)
  • .git/config configuration file
  • Other Git-controlled metadata files

Attack Vector

The attack leverages prompt injection techniques to instruct the AI agent to write malicious content to Git hook files. The attack chain proceeds as follows:

  1. An attacker crafts a malicious prompt injection payload
  2. The AI agent processes the injection and writes to .git/hooks/ files
  3. Git automatically executes these hooks during normal operations (commit, push, etc.)
  4. The malicious code runs outside the sandbox with the user's privileges

This is a network-based attack vector that requires low privileges and no user interaction, as Git automatically executes hook scripts during routine operations.

The vulnerability manifests through the sandbox's failure to prevent writes to .git configuration files. When Git hooks such as pre-commit or post-checkout are modified with malicious content, Git executes them automatically without user confirmation. For detailed technical information, see the GitHub Security Advisory.

Detection Methods for CVE-2026-26268

Indicators of Compromise

  • Unexpected modifications to .git/hooks/ files within project directories
  • Unusual executable content appearing in Git hook scripts
  • Unexplained process spawning from Git operations
  • Shell commands or scripts in hook files that were not manually created

Detection Strategies

  • Monitor file system activity for writes to .git/hooks/ directories
  • Implement file integrity monitoring on Git configuration files
  • Audit AI agent interactions for suspicious prompt patterns targeting file operations
  • Review Git hook contents for unauthorized or obfuscated code

Monitoring Recommendations

  • Enable detailed logging of file operations within Cursor's workspace directories
  • Set up alerts for any modifications to .git/ subdirectories by the application
  • Monitor process creation events associated with Git operations for anomalous child processes
  • Regularly audit Git repositories for unexpected hook modifications

How to Mitigate CVE-2026-26268

Immediate Actions Required

  • Upgrade Cursor to version 2.5 or later immediately
  • Audit all existing repositories for unauthorized modifications to .git/hooks/ files
  • Review and remove any suspicious content from Git configuration files
  • Consider temporarily disabling Git hooks in sensitive repositories until patched

Patch Information

Anysphere has addressed this vulnerability in Cursor version 2.5. The patch implements proper authorization controls to prevent writes to .git configuration files from the sandboxed environment. Users should update to version 2.5 or later to remediate this vulnerability.

For additional details, refer to the GitHub Security Advisory GHSA-8pcm-8jpx-hv8r.

Workarounds

  • Remove or make read-only all files in .git/hooks/ directories until patching is possible
  • Configure Git globally to ignore hook scripts using git config --global core.hooksPath /dev/null
  • Restrict file system permissions on .git directories to prevent unauthorized writes
  • Consider using Git's safe.directory configuration to limit operations on sensitive repositories
bash
# Disable Git hooks globally as a temporary workaround
git config --global core.hooksPath /dev/null

# Make existing hooks read-only
chmod -R 444 .git/hooks/

# Verify no malicious hooks exist
ls -la .git/hooks/
cat .git/hooks/*

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechAnysphere Cursor

  • SeverityCRITICAL

  • CVSS Score9.9

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-862
  • Vendor Resources
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2025-59944: Anysphere Cursor RCE Vulnerability

  • CVE-2025-54133: Anysphere Cursor RCE Vulnerability

  • CVE-2025-54130: Anysphere Cursor RCE Vulnerability

  • CVE-2025-54135: Anysphere Cursor RCE 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