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-2025-54135

CVE-2025-54135: Anysphere Cursor RCE Vulnerability

CVE-2025-54135 is a remote code execution flaw in Anysphere Cursor allowing attackers to exploit prompt injection and unauthorized file writes. This article covers the technical details, affected versions, impact, and mitigation.

Published: March 11, 2026

CVE-2025-54135 Overview

CVE-2025-54135 is a critical command injection vulnerability affecting Cursor, an AI-powered code editor developed by Anysphere. The vulnerability allows attackers to achieve remote code execution (RCE) by exploiting a flaw in how Cursor handles file creation within workspaces. Specifically, versions below 1.3.9 permit writing in-workspace files without user approval, and while editing existing dotfiles requires approval, creating new dotfiles does not.

This inconsistency in permission handling creates a dangerous attack surface. If sensitive MCP (Model Context Protocol) configuration files such as .cursor/mcp.json do not already exist in the workspace, an attacker can chain an indirect prompt injection attack to hijack the AI context, write malicious content to settings files, and ultimately trigger arbitrary code execution on the victim's machine without any user approval required.

Critical Impact

Attackers can achieve unauthenticated remote code execution by chaining indirect prompt injection with unprotected dotfile creation, allowing complete system compromise without user interaction.

Affected Products

  • Anysphere Cursor versions prior to 1.3.9
  • All platforms running vulnerable Cursor installations
  • Workspaces without pre-existing .cursor/mcp.json configuration files

Discovery Timeline

  • August 5, 2025 - CVE-2025-54135 published to NVD
  • August 25, 2025 - Last updated in NVD database

Technical Details for CVE-2025-54135

Vulnerability Analysis

This vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command) stems from an inconsistent access control implementation in Cursor's file handling mechanisms. The AI-powered code editor was designed with a permission system intended to protect sensitive configuration files, but a critical gap exists: while modifications to existing dotfiles require explicit user approval, the creation of new dotfiles bypasses this protection entirely.

The attack leverages the Model Context Protocol (MCP) configuration system used by Cursor to manage AI integrations and tool configurations. The .cursor/mcp.json file can define external tool integrations that execute commands on the host system. When this file doesn't exist, an attacker who can influence the AI context (via indirect prompt injection through malicious content in files, web pages, or other data sources the AI processes) can instruct the AI to create a malicious MCP configuration.

Once the malicious .cursor/mcp.json is created, the attacker-controlled configuration can define tool endpoints or commands that execute arbitrary code when the AI invokes them, achieving full remote code execution without any user approval dialogs.

Root Cause

The root cause lies in the asymmetric permission model applied to dotfile operations. The security logic correctly identifies dotfile modification as a sensitive operation requiring user consent but fails to apply the same protection to dotfile creation. This oversight allows the creation of new configuration files that can fundamentally alter the behavior of the application, including enabling code execution paths that were previously unavailable.

The vulnerability is compounded by the inherent risks of AI-powered applications that process external content. Indirect prompt injection attacks exploit the AI's inability to distinguish between legitimate instructions and malicious content embedded in data it processes, making this a particularly dangerous attack vector for AI-integrated development tools.

Attack Vector

The attack exploits Cursor's network-accessible AI processing capabilities. An attacker can embed malicious prompt injection payloads in content that a developer might open or reference in Cursor—such as source code repositories, documentation, web pages, or any other content the AI assistant might analyze. When Cursor's AI processes this content, the injected instructions can manipulate the AI into:

  1. Checking for the absence of the .cursor/mcp.json file
  2. Creating a new MCP configuration file with attacker-controlled content
  3. Defining malicious tool integrations or command execution endpoints
  4. Triggering code execution through the newly created configuration

Because creating new dotfiles requires no user approval, the entire attack chain can execute silently without alerting the victim. The network attack vector combined with no required privileges or user interaction makes this vulnerability particularly severe.

Detection Methods for CVE-2025-54135

Indicators of Compromise

  • Unexpected creation of .cursor/mcp.json files in workspace directories
  • MCP configuration files containing unfamiliar or suspicious tool definitions
  • Unusual outbound network connections originating from Cursor or child processes
  • Unauthorized process spawning from the Cursor application
  • Workspace configuration files with timestamps that don't align with user activity

Detection Strategies

  • Monitor file system events for creation of dotfiles in .cursor/ directories, particularly mcp.json
  • Implement endpoint detection rules to alert on Cursor spawning unexpected child processes
  • Review MCP configuration files for suspicious external endpoints or command definitions
  • Deploy behavioral analysis to detect AI-assisted file operations that bypass normal user workflows
  • Audit workspace directories for configuration files created without corresponding user actions

Monitoring Recommendations

  • Enable file integrity monitoring (FIM) on .cursor/ configuration directories across all development workstations
  • Configure SIEM rules to correlate Cursor process activity with network connections and child process creation
  • Implement logging for AI assistant actions, particularly file creation and modification events
  • Review developer workstation logs for signs of prompt injection attempts in processed content

How to Mitigate CVE-2025-54135

Immediate Actions Required

  • Upgrade Cursor to version 1.3.9 or later immediately across all affected systems
  • Audit existing workspaces for unauthorized .cursor/mcp.json files and review their contents
  • Remove or quarantine any suspicious MCP configuration files pending investigation
  • Review recent AI assistant activity logs for signs of unauthorized file operations
  • Consider temporarily disabling AI features if immediate patching is not possible

Patch Information

Anysphere has addressed this vulnerability in Cursor version 1.3.9. The fix implements consistent permission requirements for both creation and modification of sensitive dotfiles, ensuring that creating new configuration files like .cursor/mcp.json now requires explicit user approval, matching the protection already in place for modifications.

Organizations should prioritize upgrading to version 1.3.9 or later. For detailed information about the security fix, refer to the GitHub Security Advisory.

Workarounds

  • Pre-create empty or minimal .cursor/mcp.json files in sensitive workspaces to ensure modification protections apply
  • Implement operating system-level file access controls restricting write access to .cursor/ directories
  • Use application allowlisting to prevent unauthorized processes from being spawned by Cursor
  • Configure workspace-level read-only policies where AI code editing features are not required
  • Educate developers about prompt injection risks when working with AI-assisted coding tools
bash
# Pre-create protected mcp.json to prevent unauthorized creation
mkdir -p .cursor
touch .cursor/mcp.json
echo '{}' > .cursor/mcp.json
chmod 444 .cursor/mcp.json

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.8

  • EPSS Probability0.09%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-78
  • Vendor Resources
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-26268: Anysphere Cursor Sandbox Escape RCE Flaw

  • CVE-2025-64107: Anysphere Cursor RCE Vulnerability

  • CVE-2025-61591: Anysphere Cursor RCE Vulnerability

  • CVE-2025-59944: 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