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

CVE-2025-61591: Anysphere Cursor RCE Vulnerability

CVE-2025-61591 is a remote code execution flaw in Anysphere Cursor affecting versions 1.7 and below. Attackers can exploit MCP OAuth authentication to inject malicious commands. This article covers technical details, impact, and patches.

Published: April 21, 2026

CVE-2025-61591 Overview

CVE-2025-61591 is a command injection vulnerability affecting Cursor, an AI-powered code editor developed by Anysphere. The vulnerability exists in versions 1.7 and below when the Model Context Protocol (MCP) uses OAuth authentication with an untrusted MCP server. An attacker can impersonate a malicious MCP server and return crafted, maliciously injected commands during the interaction process, leading to command injection and potential remote code execution on the host system.

Critical Impact

This command injection vulnerability can be chained with an untrusted MCP service via OAuth to achieve arbitrary code execution on the host system, allowing attackers to execute malicious commands with full user privileges and directly compromise the system.

Affected Products

  • Anysphere Cursor versions 1.7 and below
  • Cursor installations using MCP with OAuth authentication to untrusted servers
  • Systems running Cursor with AI agent functionality enabled

Discovery Timeline

  • 2025-10-03 - CVE-2025-61591 published to NVD
  • 2025-10-17 - Last updated in NVD database

Technical Details for CVE-2025-61591

Vulnerability Analysis

This vulnerability is classified as CWE-78 (Improper Neutralization of Special Elements used in an OS Command), commonly known as OS Command Injection. The flaw resides in how Cursor handles commands returned from MCP servers during OAuth-authenticated sessions.

When a user connects Cursor to an MCP server for enhanced AI capabilities, the application trusts and processes commands returned by the server. In a legitimate scenario, these commands facilitate AI-assisted programming workflows. However, when connecting to an untrusted or attacker-controlled MCP server, malicious commands can be injected into the response stream.

The vulnerability is particularly dangerous because it operates within the context of the user's privileges, meaning any commands executed will have the same access rights as the user running Cursor. This could include read/write access to source code, system files, credentials, and other sensitive data.

Root Cause

The root cause of this vulnerability stems from insufficient input validation and sanitization of commands received from MCP servers during OAuth-authenticated sessions. The application fails to properly validate or sanitize the command data returned by external MCP services before processing them, creating an injection point that attackers can exploit.

The trust model assumes MCP servers will return benign, expected command structures. When this assumption is violated by a malicious server, the lack of proper command sanitization allows arbitrary command execution.

Attack Vector

The attack requires user interaction—specifically, the victim must connect their Cursor installation to a malicious MCP server using OAuth authentication. An attacker can exploit this vulnerability through the following attack chain:

  1. The attacker sets up a rogue MCP server designed to appear legitimate
  2. The attacker entices or tricks a user into connecting their Cursor instance to this malicious server via OAuth
  3. During normal interaction with the AI agent, the malicious server returns crafted responses containing injected commands
  4. Cursor processes these malicious commands without proper sanitization
  5. The injected commands execute on the victim's system with the user's full privileges

The attack leverages the OAuth authentication flow as a vector for establishing trust, making it particularly deceptive as users may believe OAuth-authenticated connections are inherently secure.

Detection Methods for CVE-2025-61591

Indicators of Compromise

  • Unexpected outbound network connections from the Cursor application to unfamiliar MCP server endpoints
  • Unusual process spawning activity originating from the Cursor process
  • Suspicious command execution patterns in system logs correlating with Cursor usage
  • Unexpected OAuth authorization requests or tokens associated with unknown MCP services

Detection Strategies

  • Monitor process creation events for child processes spawned by the Cursor application that execute shell commands or system utilities
  • Implement network monitoring to detect connections to unauthorized or suspicious MCP server endpoints
  • Review OAuth authorization logs for connections to untrusted MCP services
  • Deploy endpoint detection rules to identify command injection patterns in process command lines

Monitoring Recommendations

  • Enable detailed logging for Cursor application activity and MCP server connections
  • Implement application allowlisting to control which MCP servers can be used within your organization
  • Configure network security tools to alert on connections to unrecognized MCP endpoints
  • Establish baseline behavior for Cursor usage and alert on anomalies

How to Mitigate CVE-2025-61591

Immediate Actions Required

  • Update Cursor to the patched version 2025.09.17-25b418f or later immediately
  • Audit all configured MCP server connections and remove any untrusted or unrecognized services
  • Review OAuth authorizations granted by Cursor and revoke any suspicious or unnecessary permissions
  • Restrict MCP server connections to only trusted, verified endpoints within your organization

Patch Information

Anysphere has released a patch identified as 2025.09.17-25b418f that addresses this vulnerability. While there is no formal version release number associated with this fix, users should ensure their Cursor installation includes this specific patch. For detailed patch information and installation instructions, refer to the GitHub Security Advisory.

Workarounds

  • Disable MCP functionality entirely if it is not required for your workflow until the patch can be applied
  • Implement network-level controls to block connections to untrusted MCP servers
  • Use only internally hosted and verified MCP servers with strict access controls
  • Enable additional endpoint protection to monitor and block suspicious command execution from the Cursor process
bash
# Configuration example - Restrict network access for Cursor
# Add firewall rules to limit Cursor's outbound MCP connections
# Replace TRUSTED_MCP_SERVER with your organization's approved MCP endpoint

# Linux iptables example
iptables -A OUTPUT -p tcp -m owner --cmd-owner cursor -d TRUSTED_MCP_SERVER --dport 443 -j ACCEPT
iptables -A OUTPUT -p tcp -m owner --cmd-owner cursor --dport 443 -j DROP

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.10%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • 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-59944: Anysphere Cursor RCE Vulnerability

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