Skip to the content
AI and Cybersecurity Learning and Practice Center Test automation Open the Learning Center

IncidentMCP servers and tools

CurXecute: a Slack message leads to code execution in Cursor

HighCursor

A message in a public Slack channel could hijack Cursor's agent and make it run attacker commands. The agent could add an MCP server entry to its config, and Cursor started it before the developer approved anything.

Replay the attack step by step in the Learning Center

How it happened

  1. The developer connects Cursor to an MCP server that reads outside content, such as Slack.
  2. The attacker posts a message with injected instructions.
  3. Asked to summarize Slack, the agent is steered into adding an attacker command to ~/.cursor/mcp.json.
  4. Cursor started the new server immediately, running the command with the developer's privileges.

Impact

Full remote code execution on the developer's machine.

The fix

Fixed in Cursor 1.3 (July 2025); the agent can no longer write MCP-sensitive files without approval.

Lessons

  • Files that decide what an agent launches must need explicit approval before changes take effect.
  • MCP servers that pull in public content are entry points for prompt injection.
  • Keep AI IDEs up to date.

Sources