CVE-2025-61590 Cursor is vulnerable to RCE via .code-workspace files using Prompt Injection
Attackers can achieve remote code execution in Cursor by using prompt injection to modify workspace settings files.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2025-61590?
CVE-2025-61590 is a high-severity code injection vulnerability in cursor, published on 3 Oct 2025. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
Cursor is a code editor built for programming with AI. Versions 1.6 and below are vulnerable to Remote Code Execution (RCE) attacks through Visual Studio Code Workspaces. Workspaces allow users to open more than a single folder and save specific settings (pretty similar to .vscode/settings.json) for the folders / project. An untitled workspace is automatically created by VS Code (untitled.code-workspace), which contains all the folders and workspace settings from the user's current session, opening up an entire new attack vector if the user has a .code-workspace file in path (either untitled created automatically or a saved one). If an attacker is able to hijack the chat context of the victim (such as via a compromised MCP server), they can use prompt injection to make the Cursor Agent write into this file and modify the workspace. This leads to a bypass of CVE-2025-54130 which can lead to RCE by writing to the settings section. This issue is fixed in version 1.7.
Weakness: CWE-94
Which versions are affected by CVE-2025-61590?
It affects 1 product.
Products include Anysphere Cursor.
How do I fix CVE-2025-61590?
No fix has been published for CVE-2025-61590 yet. Limit exposure of the affected software until one is available.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2025-61590 being exploited?
There is no known exploitation of CVE-2025-61590 in the wild and no public exploit code.
Other vulnerabilities in cursor
- CVE-2026-50548 Cursor Desktop sandbox escape via agent-controlled working directory
- CVE-2026-50549 Cursor Desktop sandbox escape via symlink and failed path canonicalization
- CVE-2025-64106 Cursor: Speedbump Modal Bypass in MCP Server Deep-Link
- CVE-2025-64107 Cursor is Vulnerable to Path Manipulation Using Backslashes on Windows
- CVE-2025-64108 Cursor's Sensitive File Modification can Lead to NTFS Path Quirks