Overview
The vulnerability CVE-2025-54135 has been recently discovered in Cursor, an AI-based code editor. The vulnerability allows a potential attacker to write in-workspace files without requiring user approval, thereby leading to a possible Remote Code Execution (RCE). This vulnerability affects versions below 1.3.9 of Cursor and can lead to significant security risks including system compromise or data leakage. Given the increasing popularity of AI-based code editors among developers, this vulnerability could have widespread implications if not addressed promptly.
Vulnerability Summary
CVE ID: CVE-2025-54135
Severity: High (8.5 CVSS Score)
Attack Vector: Network
Privileges Required: None
User Interaction: None
Impact: Potential system compromise or data leakage
Affected Products
Share secrets securely
Ameeba is private infrastructure for communication and sensitive work built on encrypted identity instead of exposed corporate identity systems.
Passwords, credentials, confidential files, screenshots, internal discussions, sensitive AI context, and private coordination should not become exposed across ordinary communication platforms.
- • Encrypted identity
- • Private Spaces for organizations and teams
- • End-to-end encrypted chat, calls, files, and notes
- • Sensitive AI work and protected collaboration
- • Built for information that cannot leak
Our mission is to secure human work alongside AI.
Product | Affected Versions
Cursor Code Editor | <1.3.9 How the Exploit Works
The exploit works by taking advantage of a loophole in the file permission settings of Cursor. The code editor allows writing in-workspace files without requiring user approval. If the file is a dotfile, editing it requires approval but creating a new one doesn’t. Therefore, if sensitive MCP files such as .cursor/mcp.json do not already exist in the workspace, an attacker can chain a indirect prompt injection vulnerability to hijack the context to write to the settings file and trigger Remote Code Execution (RCE) on the victim’s system without user approval.
Conceptual Example Code
Here is a conceptual example of how the vulnerability might be exploited using a shell command:
# Create a new .cursor/mcp.json file
echo '{ "settings": { "command": "malicious_command_here" } }' > .cursor/mcp.json
# Trigger the indirect prompt injection vulnerability
curl -X POST -H "Content-Type: application/json" -d '{"filename":".cursor/mcp.json","content":"malicious_content_here"}' http://target.example.com/vulnerable/endpoint
The above code first creates a new .cursor/mcp.json file with a malicious command. Then, it triggers the indirect prompt injection vulnerability by sending a POST request to a vulnerable endpoint on the target’s system, which subsequently writes the malicious content to the settings file leading to RCE.
Remediation
The vendor has released a patch that fixes this vulnerability in version 1.3.9 of Cursor. All users are strongly advised to update to the patched version as soon as possible. As a temporary mitigation, a Web Application Firewall (WAF) or Intrusion Detection System (IDS) can be used to filter out malicious requests.
