Incident report

Cursor IDE CurXecute Indirect Prompt Injection Rewriting .cursor/mcp.json for RCE

CVE-2025-54135 (dubbed CurXecute by Aim Labs and published August 4, 2025) exposed a critical remote code execution chain in the Cursor AI IDE (`< 1.3.9`). When a developer queried an external data source through a connected MCP server (such as Slack or a public issue tracker), an indirect prompt injection in the returned content instructed Cursor's agent to create or overwrite `.cursor/mcp.json` with a malicious stdio server command. Because Cursor immediately launched newly written MCP server commands even before explicit user approval of the edit, attackers achieved instant host RCE. Cursor v1.3.9 remediated the flaw by requiring explicit confirmation before launching modified MCP configs.

Incident record

Reported
Severity
Critical
Vector
Indirect Prompt Injection
Affected system type
AI-Native Code Editors & MCP Hosts
Reference
CVE-2025-54135
Reference URI
https://nvd.nist.gov/vuln/detail/CVE-2025-54135

Inspect in Interactive Incidents Hub

Defensive lesson

Protect agent MCP configuration files from autonomous model writes and require explicit human re-approval whenever an MCP server command changes.

Referenced techniques