A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
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-54131

CVE-2025-54131: Anysphere Cursor RCE Vulnerability

CVE-2025-54131 is a remote code execution flaw in Anysphere Cursor that allows attackers to bypass allowlist protections and execute arbitrary commands. This article covers technical details, affected versions, and mitigation.

Published: June 9, 2026

CVE-2025-54131 Overview

CVE-2025-54131 is a command injection vulnerability in Cursor, an AI-powered code editor developed by Anysphere. The flaw allows attackers to bypass the auto-run allowlist using backtick (`) or $(cmd) shell substitution syntax. When users configure Cursor to use an allowlist instead of the default per-command approval, attackers can execute arbitrary commands outside that allowlist without user consent. The vulnerability becomes exploitable when chained with indirect prompt injection, where malicious instructions are embedded in content the AI agent processes. The issue is fixed in Cursor version 1.3.

Critical Impact

Attackers can achieve arbitrary command execution on developer workstations by chaining indirect prompt injection with allowlist bypass, leading to source code theft, credential exfiltration, or supply chain compromise.

Affected Products

  • Anysphere Cursor versions prior to 1.3
  • Cursor installations configured with command allowlist mode
  • Cursor auto-run mode for terminal commands

Discovery Timeline

  • 2025-08-01 - CVE-2025-54131 published to NVD
  • 2025-08-25 - Last updated in NVD database

Technical Details for CVE-2025-54131

Vulnerability Analysis

The vulnerability is classified as Command Injection [CWE-77]. Cursor's auto-run feature lets the AI agent execute terminal commands automatically. Users can opt into an allowlist mode that approves specific commands without prompting. The allowlist matcher inspects the command string but fails to account for shell metacharacters that trigger command substitution.

An attacker who controls input the AI processes can craft commands such as ls `malicious-cmd` or ls $(malicious-cmd). The outer command matches the allowlist, while the shell evaluates the inner substitution before execution. This grants arbitrary command execution under the user's account.

The attack becomes practical through indirect prompt injection. Malicious instructions hidden in repositories, documentation, web pages, or other content the agent reads can steer the AI into running crafted commands.

Root Cause

The root cause is incomplete neutralization of special elements in commands evaluated against the allowlist. The matcher treats the command string as opaque text rather than parsing shell syntax. Backtick and $() substitutions are not stripped, rejected, or evaluated before allowlist comparison.

Attack Vector

Exploitation requires the user to have switched Cursor from default per-call approval to allowlist mode. The attacker plants prompt injection payloads in content the agent ingests. The agent constructs a terminal command containing shell substitution that the allowlist permits at face value. The shell then executes the attacker's embedded payload with the developer's privileges.

The vulnerability mechanism is described in the GitHub Security Advisory GHSA-534m-3w6r-8pqr. No verified public proof-of-concept code is available.

Detection Methods for CVE-2025-54131

Indicators of Compromise

  • Terminal command history containing backtick or $() substitution patterns issued by the Cursor agent process
  • Unexpected child processes spawned from Cursor or its integrated terminal
  • Outbound network connections from developer endpoints to unfamiliar hosts shortly after AI agent activity
  • Reads of sensitive files such as ~/.ssh/, ~/.aws/credentials, or .env by Cursor child processes

Detection Strategies

  • Monitor process trees where Cursor spawns shells executing commands containing ` or $( metacharacters
  • Correlate AI agent prompts with executed shell commands to identify substitution patterns the allowlist should have blocked
  • Audit Cursor configuration files to identify endpoints running in allowlist mode and assess exposure
  • Flag agent-initiated commands that access credential stores, package registries, or git remotes

Monitoring Recommendations

  • Enable shell command auditing (auditd on Linux, PowerShell ScriptBlockLogging on Windows) on developer workstations
  • Forward endpoint process telemetry to a centralized analytics platform for behavioral analysis
  • Alert on Cursor processes executing outside expected directories or contacting non-corporate domains
  • Review repositories and documentation pulled into AI context for embedded instructions targeting terminal execution

How to Mitigate CVE-2025-54131

Immediate Actions Required

  • Upgrade Cursor to version 1.3 or later on all developer workstations
  • Revert to the default setting requiring approval for every terminal command until the upgrade is verified
  • Inventory endpoints that enabled allowlist mode and prioritize patching those systems first
  • Rotate any credentials, tokens, or SSH keys accessible from workstations that ran vulnerable Cursor versions in allowlist mode

Patch Information

Anysphere addressed the vulnerability in Cursor 1.3. The fix updates the allowlist matcher to properly handle shell metacharacters that enable command substitution. Refer to the Cursor Security Advisory GHSA-534m-3w6r-8pqr for vendor guidance.

Workarounds

  • Disable auto-run mode entirely and require manual approval for every terminal command issued by the AI agent
  • Restrict the AI agent to ingesting only trusted repositories and documentation to limit indirect prompt injection exposure
  • Run Cursor inside a sandboxed environment or dedicated virtual machine with no access to production credentials
  • Apply least-privilege principles on developer accounts to constrain the impact of arbitrary command execution
bash
# Configuration example: disable allowlist mode and require approval for every command
# In Cursor settings.json
{
  "cursor.terminal.autoRun": false,
  "cursor.terminal.allowlist": [],
  "cursor.terminal.requireApproval": "always"
}

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

  • 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-77
  • 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-61590: Anysphere Cursor RCE Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today 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