External risk intelligence

Cursor IDE Prompt Injection Leading to RCE

CVE advisorySeverity: CRITICAL (CVSS 9.8)

CVE-2025-59944

Cursor is a local desktop code editor application installed on a user's machine. The vulnerable functionality involves file system interactions within the user's local workspace or IDE configuration. It is not an internet-facing service, edge gateway, or network appliance; therefore, it does not have a public-facing attack surface in standard deployments.

Remote Code Execution

Anysphere Cursor

1.6.23 and earlier

Halo Surface Signal: 1 out of 5 — much less likely to be public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

A security vulnerability exists in the Cursor AI code editor, allowing unauthorized modification of sensitive configuration files through prompt injection. This could potentially lead to remote code execution on affected systems. The issue is present in versions prior to 1.7.

  • Code editor vulnerability allows file tampering.
  • Affects users who can be tricked by prompts.
  • Confirm relevance and check local installations.

Attack Path

How an attacker could exploit the issue

Attackers can leverage prompt injection to modify sensitive files within the Cursor code editor, potentially leading to remote code execution. This attack targets the editor's handling of specific configuration files, exploiting case-insensitive file systems to achieve arbitrary code execution.

  • Requires attacker-controlled input.
  • Triggered by specially crafted prompts.
  • Results in remote code execution.

Live Threat

Current exploitation, exposure, and threat context

This vulnerability could allow an attacker to modify sensitive configuration files within the Cursor IDE, potentially leading to remote code execution. This occurs when prompt injection is used to manipulate these files on case-insensitive file systems.

  • Sensitive configuration files.
  • Prompt injection on case-insensitive systems.
  • Remote code execution.

Operational Fix

Recommended remediation, mitigation, and detection steps

Attackers can exploit prompt injection vulnerabilities in Cursor's case-sensitive file checks to achieve remote code execution by modifying sensitive files like `*/.cursor/mcp.json` on case-insensitive file systems. This advisory applies to application owners responsible for developer tools and system owners deploying these tools. The first practical step is to inventory Cursor installations, identify usage, and confirm business criticality.

  • Application owners must investigate usage.
  • Verify all Cursor installations are updated.
  • Plan remediation for critical systems.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is Cursor and how is it used?

Cursor is a code editor designed specifically for AI-assisted programming. Developers use it to write, debug, and manage source code, leveraging its internal AI features to automate development tasks directly within their local workspace environment.

What does CWE-178 mean for CVE-2025-59944?

CWE-178 refers to improper handling of case-sensitivity in file paths. In this vulnerability, the editor fails to properly validate file names on case-insensitive file systems. This allows an attacker to bypass security checks and overwrite sensitive configuration files, such as mcp.json, to execute unauthorized commands.

How is this prompt injection vulnerability triggered?

The attack requires the editor to process a malicious prompt that manipulates sensitive system files. This vulnerability specifically impacts operating systems that treat file names as case-insensitive, such as Windows or macOS. Systems that strictly enforce case-sensitivity for these files are not susceptible to this specific file-path manipulation.

Is my machine vulnerable to this CVE?

According to Halo Surface Signal, Cursor is a local desktop application that typically lacks an internet-facing attack surface. Because it is not a network-exposed service, the risk is localized to the specific machine where the editor is running rather than being a remote network-wide threat.

What steps should I take to secure my system?

Begin by identifying all local installations of Cursor within your environment to understand your exposure. The primary remediation is to update the application to version 1.7 or higher, which resolves the case-sensitivity check issue. Ensure all developers on your team are aware of the update and have applied the latest version.

References