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

CVE-2025-54136: Anysphere Cursor RCE Vulnerability

CVE-2025-54136 is a remote code execution flaw in Anysphere Cursor that allows attackers to execute malicious code by modifying trusted MCP configuration files. This article covers technical details, affected versions, and mitigation.

Published: April 15, 2026

CVE-2025-54136 Overview

CVE-2025-54136 is a command injection vulnerability (CWE-78) affecting Cursor, an AI-powered code editor developed by Anysphere. In versions 1.2.4 and below, attackers can achieve remote and persistent code execution by modifying an already trusted MCP (Model Context Protocol) configuration file inside a shared GitHub repository or by editing the file locally on the target's machine.

Once a collaborator accepts a harmless MCP configuration, the attacker can silently swap it for a malicious command (e.g., calc.exe) without triggering any warning or re-prompt from the application. This vulnerability enables arbitrary code execution when an attacker has write permissions on a user's active branches of a source repository containing previously approved MCP servers, or when the attacker has arbitrary file-write capability locally.

Critical Impact

Attackers with repository write access or local file-write capabilities can achieve persistent arbitrary code execution on victim machines through silent MCP configuration manipulation without user re-authorization.

Affected Products

  • Anysphere Cursor versions 1.2.4 and below
  • Cursor installations with trusted MCP configurations in shared repositories
  • Development environments using collaborative GitHub workflows with MCP servers

Discovery Timeline

  • August 2, 2025 - CVE-2025-54136 published to NVD
  • August 25, 2025 - Last updated in NVD database

Technical Details for CVE-2025-54136

Vulnerability Analysis

This vulnerability stems from insufficient validation of MCP configuration files after initial user approval. The Cursor code editor implements a trust model for MCP configurations where users must explicitly approve MCP servers before execution. However, the application fails to re-validate or re-prompt users when the content of an already-approved MCP configuration file is modified.

The attack exploits the gap between the initial trust establishment and subsequent file modifications. When a user approves an MCP configuration, that approval persists even after the configuration's contents are completely replaced with malicious commands. This creates a window where attackers can inject arbitrary commands that execute with the user's privileges without any security warnings.

Root Cause

The root cause is a trust-on-first-use (TOFU) implementation flaw in the MCP configuration handling. The application stores approval decisions based on file identity rather than file content, allowing post-approval modifications to bypass security controls. This represents a Time-of-Check Time-of-Use (TOCTOU) vulnerability where the security check (user approval) occurs at a different time than the actual use (command execution).

Attack Vector

The attack can be executed through two primary vectors:

  1. Repository-based Attack: An attacker with write permissions to a shared GitHub repository can modify an MCP configuration file that was previously approved by collaborators. When the victim pulls the updated repository and uses Cursor, the malicious commands execute without prompting for re-approval.

  2. Local File Modification: An attacker with local file-write access can directly modify the MCP configuration file on the target system. This could be achieved through another vulnerability, malware, or physical access.

The attack requires low privilege (authenticated repository access or local file write) and no user interaction beyond the initial, legitimate MCP approval. The network-based attack vector enables remote exploitation through collaborative development workflows.

Detection Methods for CVE-2025-54136

Indicators of Compromise

  • Unexpected modifications to MCP configuration files in Cursor project directories
  • Execution of suspicious processes spawned by the Cursor application
  • Git commit history showing MCP configuration changes from unexpected contributors
  • Unusual outbound network connections or command executions originating from the Cursor process

Detection Strategies

  • Monitor file integrity of MCP configuration files (typically .cursor/ directory) for unauthorized modifications
  • Implement git hooks to alert on changes to MCP configuration files in shared repositories
  • Enable process monitoring to detect child processes spawned by Cursor that match known malicious patterns
  • Review repository commit history for MCP configuration changes by untrusted contributors

Monitoring Recommendations

  • Deploy endpoint detection solutions to monitor for suspicious process chains originating from code editor applications
  • Implement file integrity monitoring on development workstations targeting Cursor configuration directories
  • Enable audit logging for file modifications in user profile directories where Cursor stores configuration data
  • Configure alerts for repository webhooks that trigger on changes to MCP-related configuration files

How to Mitigate CVE-2025-54136

Immediate Actions Required

  • Upgrade Cursor to version 1.3 or later which contains the security fix
  • Review all existing MCP configurations in shared repositories for unauthorized modifications
  • Audit git history of MCP configuration files to identify potential tampering
  • Temporarily disable or remove untrusted MCP configurations until upgrade is complete

Patch Information

Anysphere has released version 1.3 of Cursor which addresses this vulnerability. The fix implements proper content-based validation for MCP configurations, requiring user re-approval when configuration contents change. Users should update immediately through the Cursor application's built-in update mechanism or by downloading the latest version from the official website.

For detailed information about the vulnerability and patch, refer to the GitHub Security Advisory GHSA-24mc-g4xr-4395.

Workarounds

  • Restrict write access to repositories containing MCP configurations to trusted contributors only
  • Implement branch protection rules requiring code review for changes to MCP configuration files
  • Use file system permissions to make MCP configuration files read-only after initial approval
  • Consider disabling MCP functionality entirely until the patch can be applied in high-security environments
  • Monitor MCP configuration directories for any file modifications using system-level file watching tools
bash
# Example: Set MCP configuration files to read-only after approval
chmod 444 .cursor/mcp-config.json

# Example: Create a git pre-commit hook to warn on MCP config changes
# Add to .git/hooks/pre-commit
if git diff --cached --name-only | grep -q "mcp-config"; then
    echo "WARNING: MCP configuration file modified - review carefully"
    exit 1
fi

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

  • SeverityHIGH

  • CVSS Score8.8

  • EPSS Probability0.17%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/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-59944: Anysphere Cursor RCE Vulnerability

  • CVE-2025-54133: Anysphere Cursor RCE Vulnerability

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