Ameeba Chat App store presentation
Download Ameeba Chat Today
Ameeba Blog Search

CVE-2025-54135: Critical Remote Code Execution Vulnerability in Cursor Code Editor

Ameeba’s Mission: Safeguarding privacy by securing data and communication with our patented anonymization technology.

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

Ameeba Chat Icon Escape the Surveillance Era

Most apps won’t tell you the truth.
They’re part of the problem.

Phone numbers. Emails. Profiles. Logs.
It’s all fuel for surveillance.

Ameeba Chat gives you a way out.

  • • No phone number
  • • No email
  • • No personal info
  • • Anonymous aliases
  • • End-to-end encrypted

Chat without a trace.

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.

Talk freely. Stay anonymous with Ameeba Chat.

Disclaimer:

The information and code presented in this article are provided for educational and defensive cybersecurity purposes only. Any conceptual or pseudocode examples are simplified representations intended to raise awareness and promote secure development and system configuration practices.

Do not use this information to attempt unauthorized access or exploit vulnerabilities on systems that you do not own or have explicit permission to test.

Ameeba and its authors do not endorse or condone malicious behavior and are not responsible for misuse of the content. Always follow ethical hacking guidelines, responsible disclosure practices, and local laws.
Ameeba Chat