AI agent · August 1, 2025

Cursor MCP config flaws (MCPoison and prompt-injected mcp.json) allowed silent code execution

ResolvedUpdated CVE-2025-54136CVE-2025-54135GHSA-24mc-g4xr-4395GHSA-4cxx-hrm3-49rm

In August 2025 Cursor published two advisories about its handling of MCP configuration files. CVE-2025-54136 ("MCPoison", found by Check Point) let an attacker swap the command behind an already-approved MCP server in a shared repository without a new prompt; CVE-2025-54135 let a prompt injection make the agent create .cursor/mcp.json and run a command without approval. Either gave code execution with the developer's access to local credentials. Update Cursor to 1.3.9 or later and review .cursor/ changes in shared repositories.

DisclosedAugust 1, 2025
AffectedCursor
TypeAI agent
StatusResolved
CVECVE-2025-54136, CVE-2025-54135

What was exposed

No exploitation in the wild was reported; these are vulnerabilities that put credentials at risk. Both flaws end in arbitrary commands running in the developer's user context, either every time the project opens (MCPoison) or as soon as the agent follows injected instructions. Check Point notes that developer machines often hold cloud credentials and source-code access. In practice that means API keys in MCP configs and .env files, SSH keys, cloud CLI profiles, GitHub tokens and anything else the user can read. Cursor tied MCP approval to the server's name rather than its command, so a harmless entry approved once could later be changed to a malicious one.

Am I affected?

You are affected by CVE-2025-54136 if you used Cursor 1.2.4 or earlier (NVD's range) on a repository whose .cursor/ MCP configuration can be changed by others, such as a shared GitHub repository with collaborators. You are affected by CVE-2025-54135 if you used Cursor below 1.3.9 (NVD's range; the fix is 1.3.9) and let the agent process untrusted content (web pages, issues, messages from MCP tools) in a workspace with no .cursor/mcp.json. Check your Cursor version under About, and review the git history of .cursor/ files in projects you share.

What to do now

  1. Update Cursor to 1.3.9 or later, which fixes both issues.
  2. Review the history of .cursor/mcp.json and other MCP config files in shared repositories for commands you did not approve, and protect those paths with code-owner review.
  3. If you find an unexpected command, treat the machine as compromised and rotate the credentials it held, including API keys in MCP configs, GitHub tokens, SSH keys and cloud credentials.
  4. Keep API keys out of committed MCP configuration; reference environment variables or a secret store instead.

Keys to rotate

Guides to the credentials this incident put at risk:

Timeline

  1. Check Point Research reports the MCP re-approval bypass to Cursor. Source
  2. Cursor releases version 1.3, which Check Point's testing shows asks for approval again whenever an MCP entry changes. Source
  3. Cursor publishes GHSA-24mc-g4xr-4395 (CVE-2025-54136, CVSS 7.2), fixed in 1.3. Source
  4. Cursor publishes GHSA-4cxx-hrm3-49rm (CVE-2025-54135, CVSS 8.5): the agent could create MCP-sensitive dotfiles without approval; fixed in 1.3.9. Source
  5. Check Point publishes its MCPoison write-up, including a proof of concept that opens a persistent reverse shell. Source

Indicators

From the advisories listed below. Use them to search your logs, lockfiles and workflow runs.

  • Changes to the command or args of an existing entry in .cursor/mcp.json or .cursor/rules/mcp.json in a shared repository.
  • A new .cursor/mcp.json created by the agent rather than by a person.

Frequently asked questions

Am I affected by the Cursor incident?

You are affected by CVE-2025-54136 if you used Cursor 1.2.4 or earlier (NVD's range) on a repository whose .cursor/ MCP configuration can be changed by others, such as a shared GitHub repository with collaborators. You are affected by CVE-2025-54135 if you used Cursor below 1.3.9 (NVD's range; the fix is 1.3.9) and let the agent process untrusted content (web pages, issues, messages from MCP tools) in a workspace with no .cursor/mcp.json. Check your Cursor version under About, and review the git history of .cursor/ files in projects you share.

What was exposed in the Cursor incident?

No exploitation in the wild was reported; these are vulnerabilities that put credentials at risk. Both flaws end in arbitrary commands running in the developer's user context, either every time the project opens (MCPoison) or as soon as the agent follows injected instructions. Check Point notes that developer machines often hold cloud credentials and source-code access. In practice that means API keys in MCP configs and .env files, SSH keys, cloud CLI profiles, GitHub tokens and anything else the user can read. Cursor tied MCP approval to the server's name rather than its command, so a harmless entry approved once could later be changed to a malicious one.

Which keys should I rotate?

Rotate any GitHub, AWS (IAM access keys), Anthropic, OpenAI credentials that were reachable from affected systems, starting with the ones that can publish code or reach production.

Keep keys out of reach of the next compromised package

BotPassword is in early access. Request an invite and we'll email you when your spot opens.