Agentic AI Security
CurXecute and MCPoison: MCP Configuration Is Executable Code
Two Cursor vulnerabilities disclosed in August 2025 turned an MCP configuration file into a way to run commands on a developer's machine. A post-incident reading, and why tool configuration needs the same controls as code.
In early August 2025, two security teams disclosed vulnerabilities in Cursor, an AI code editor, that shared a theme. Both concerned the file in which Cursor stores its Model Context Protocol servers, and both showed that whoever could change that file could run commands on the developer’s machine.
Aim Labs called its finding CurXecute (CVE-2025-54135). Check Point Research called its finding MCPoison (CVE-2025-54136). GitHub, acting as the CVE numbering authority, scored them 8.6 and 7.2 respectively under CVSS 3.1. Cursor fixed both in its 1.3 release line; the CVE record for CurXecute names version 1.3.9.
Two paths to the same file
An MCP server entry in Cursor’s configuration names a command to run, with its arguments. Starting the server means running that command. The configuration file is therefore a list of programs the editor will execute, and the two vulnerabilities attacked that list from different directions.
| CurXecute (CVE-2025-54135) | MCPoison (CVE-2025-54136) | |
|---|---|---|
| How the configuration changed | Injected content, arriving through a connected MCP server such as a chat integration, led the agent to write a new entry | Someone with write access to a shared repository swapped the command or arguments of an entry the user had already approved |
| Why it ran | “Cursor instantly executes any new entry added to ~/.cursor/mcp.json. No confirmation is required.” (Aim Labs) | Once approved, “future modifications to its command or arguments are trusted without any additional validation or prompt” (Check Point) |
| Control that would have held | No automatic start for new entries; the agent cannot write the configuration | Approval bound to the exact command and arguments, re-requested on any change |
Source: Aim Labs, CurXecute disclosure (1 August 2025); Check Point Research, MCPoison disclosure (5 August 2025); CVE-2025-54135 and CVE-2025-54136 (CNA: GitHub). Controls are the author's.
According to Check Point, Cursor’s fix triggers “a mandatory approval prompt” for any change to an MCP configuration, even one as small as adding a space. Neither disclosure reports exploitation outside research.
Three controls for any agent that manages tools
Treat tool configuration as code. A file that names commands to execute deserves the protections of the code base it sits next to: code review for changes, protection from the agent’s own edits, and an audit trail of who changed what. In repositories, that means placing MCP configuration under the same path protections as CI definitions and hook scripts. On developer machines, it means managed settings that define which MCP servers are allowed, where the tool supports them.
Bind trust to the exact content. MCPoison worked because trust attached to an entry’s name while its content could change underneath. Any approval of a tool, a server or a plugin should be bound to an exact command, version or hash, so that a change produces a new request for approval.
Keep the agent away from its own permissions. CurXecute needed the agent to write a file that granted it new capabilities. An agent that can edit its own tool list or permissions can be talked into escalating them by injected content. The files that define what an agent may do should be outside what the agent may edit, a rule that applies equally to hook scripts, permission settings and tool configuration.
In the terms of the OWASP Top 10 for Agentic Applications, published in December 2025, both cases end in unexpected code execution, and MCPoison also resembles its agentic supply-chain entry, since the poisoned entry arrived through a shared repository.