Arbitrary code execution from Cursor Agent through a prompt injection via MCP Special Files
CVE-2025-54135 · GHSA-4cxx-hrm3-49rm · published 2025-08-02
- Severity
- High
- CVSS score
- 8.5
- Chance of exploitation (EPSS)
- Not scored
- Fixed in
- 1.3.9
- Exploitation No known exploitation
- Automatable No
- Technical impact Total
- CISA SSVC
If chained with a separate prompt injection vulnerability, this could allow the writing of sensitive MCP files on the host by the agent. This can then be used to directly execute code by adding it as a new MCP server.
Upgrade cursor to 1.3.9 or later. If you start it from an MCP config with npx or uvx, pin that version so an old cached copy is not used.
The agent has been blocked from writing MCP-sensitive files without approval.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| cursor | App | <= 1.2.1 | 1.3.9 |
- CriticalUnauthenticated Remote Code Execution in Langflow via Public Flow Build EndpointlangflowExploited
- CriticalRay is vulnerable to Critical RCE via Safari & Firefox Browsers through DNS Rebinding AttackrayExploited
- CriticalLangflow Unauth RCElangflow, langflow-baseExploited
- HighLiteLLM: Authenticated command execution via MCP stdio test endpointslitellmExploited
- CriticalMLflow vulnerable to remote code execution on unauthenticated servers via third-party scorer deserialization importing caller-placed artifacmlflow
- CriticalAgno: Arbitrary code execution via `eval()` on `field_type` in `FunctionCall`agno
- CriticalCursor Desktop sandbox escape via agent-controlled working directorycursor
- CriticalCursor Desktop sandbox escape via symlink and failed path canonicalizationcursor
- HighSandbox escape via tampered Python virtual environmentscursor
- HighSandbox escape via launching privileged containerscursor
- HighCursor Desktop sandbox escape via Claude hook configurationcursor
- HighSandbox escape via Git hookscursor
The impact, patch and workaround text comes from the advisory, shortened (published by Cursor). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.