What’s Vulnerable › Vulnerabilities

CVE-2025-54135: Cursor Agent is vulnerable to prompt injection via MCP Special Files

Description

Cursor is a code editor built for programming with AI. Cursor allows writing in-workspace files with no user approval in versions below 1.3.9, If the file is a dotfile, editing it requires approval but creating a new one doesn't. Hence, if sensitive MCP files, such as the .cursor/mcp.json file don't 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 RCE on the victim without user approval. This is fixed in version 1.3.9.

Affected products

How to fix

Upgrade to a fixed version: cursor 1.3.9. Check the vendor advisory for mitigations.

References

Get alerted when CVE-2025-54135 or the next vulnerability affects your stack