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-2024-48919

CVE-2024-48919: Cursor Code Editor RCE Vulnerability

CVE-2024-48919 is a remote code execution flaw in Cursor code editor that allows attackers to inject malicious commands via Terminal Cmd-K. This post explains its impact, affected versions, and mitigation steps.

Published: April 14, 2026

CVE-2024-48919 Overview

CVE-2024-48919 is a prompt injection vulnerability in Cursor, an AI-powered code editor. Prior to September 27, 2024, if a user generated a terminal command via Cursor's Terminal Cmd-K/Ctrl-K feature and explicitly imported a malicious web page into the Terminal Cmd-K prompt, an attacker with control over the referenced web page could have a significant chance of influencing the language model to output arbitrary commands for execution in the user's terminal.

This vulnerability requires the user to explicitly opt-in to including the contents of a compromised webpage, and it requires that the attacker display prompt injection text in the contents of the compromised webpage. The attack leverages improper input validation (CWE-20) in the AI prompt processing pipeline, allowing malicious content from external sources to manipulate the language model's command generation.

Critical Impact

Attackers could potentially execute arbitrary terminal commands on a user's system by injecting malicious prompts through compromised web pages imported into Cursor's AI-assisted terminal feature.

Affected Products

  • Cursor AI Code Editor (versions prior to September 27, 2024 server-side patch)
  • Cursor versions prior to 0.42 (client-side mitigations)

Discovery Timeline

  • 2024-09-27 - Server-side patch released within two hours of issue being reported
  • 2024-10-22 - CVE CVE-2024-48919 published to NVD
  • 2024-10-23 - Last updated in NVD database

Technical Details for CVE-2024-48919

Vulnerability Analysis

This vulnerability represents a prompt injection attack vector targeting AI-assisted code editors. The core issue lies in how Cursor's Terminal Cmd-K feature processes external content that users import into their prompts. When a user includes content from a malicious web page, an attacker can embed specially crafted prompt injection text that influences the underlying language model to generate harmful terminal commands.

The attack chain requires user interaction—specifically, the user must manually import external web content into the Terminal Cmd-K prompt. Once imported, the malicious prompt injection text can manipulate the AI model into generating commands that could be automatically streamed into the terminal for execution. The vulnerability is particularly concerning because the streamed response could include newlines or control characters that might cause immediate command execution in certain shell environments without requiring the user to press Enter.

Root Cause

The root cause stems from improper input validation (CWE-20) in the prompt processing pipeline. The system failed to properly sanitize or filter newlines and control characters in the language model's output before streaming it to the terminal. This allowed malicious content embedded in imported web pages to potentially trigger automatic command execution through control character injection.

Attack Vector

The attack requires network access to host a malicious webpage that a user must explicitly import into their Terminal Cmd-K prompt. The attacker embeds prompt injection text designed to manipulate the language model into generating malicious terminal commands. When the AI model processes the combined prompt (user input plus malicious content), it may output commands containing newlines or control characters that could execute immediately in the user's terminal environment.

The attack is particularly effective in shell environments where commands can execute without the user pressing Enter, as control characters streamed directly into the terminal could trigger execution.

Detection Methods for CVE-2024-48919

Indicators of Compromise

  • Unusual terminal commands executed without explicit user confirmation
  • Imported web content in Cursor prompts containing suspicious prompt injection patterns
  • Unexpected network connections or process spawning from Cursor terminal sessions

Detection Strategies

  • Monitor for terminal command execution patterns that deviate from typical user behavior
  • Review Cursor usage logs for imports of external web content into Terminal Cmd-K prompts
  • Inspect network traffic for connections to suspicious or untrusted web pages being imported into the code editor

Monitoring Recommendations

  • Enable enhanced logging for AI-assisted command generation features
  • Implement network monitoring to detect connections to known malicious domains during Cursor sessions
  • Configure endpoint detection to alert on unusual terminal activity patterns associated with AI code editors

How to Mitigate CVE-2024-48919

Immediate Actions Required

  • Verify that the server-side patch (deployed September 27, 2024) is active—no user action required as this was applied server-side
  • Update Cursor to version 0.42 or later to benefit from client-side mitigations
  • Enable the "cursor.terminal.usePreviewBox" setting if working in shell environments where commands can execute without pressing Enter
  • Only include trusted pieces of context in AI prompts as recommended by Cursor's maintainers

Patch Information

A server-side patch was deployed on September 27, 2024, within two hours of the issue being reported. This patch prevents newlines and control characters from being streamed back to clients. Additionally, Cursor version 0.42 includes client-side mitigations that prevent any newline or control character from being streamed into the terminal directly.

The server-side patch has been applied globally, meaning even users on older versions of Cursor are protected. However, updating to version 0.42 or later provides defense-in-depth through client-side protections.

For complete details, refer to the GitHub Security Advisory.

Workarounds

  • Enable the "cursor.terminal.usePreviewBox" setting to stream AI responses into a preview box requiring manual acceptance before terminal insertion
  • Avoid importing content from untrusted web pages into Terminal Cmd-K prompts
  • Review all AI-generated commands before execution, especially when external content has been included in prompts
  • Consider restricting network access for the Cursor application to prevent loading of potentially malicious web content
bash
# Enable preview box protection in Cursor settings
# Add to your Cursor settings.json:
{
  "cursor.terminal.usePreviewBox": true
}

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechCursor

  • SeverityCRITICAL

  • CVSS Score9.2

  • EPSS Probability0.31%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-20
  • Technical References
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-31854: Cursor Code Editor RCE Vulnerability

  • CVE-2026-22708: Cursor AI Code Editor RCE Vulnerability

  • CVE-2025-64109: Cursor CLI Beta 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