Arbitrary file write from Cursor Agent through a prompt injection from malicious @Docs
High8.0CVE-2025-32018 · Published Apr 7, 2025
### Summary A recent change in the Cursor app introduced a regression affecting the set of file paths the Cursor Agent is permitted to modify automatically. Under specific conditions, the agent could be prompted, either directly by the user or via maliciously crafted context, to automatically write to files outside of the opened workspace. This behavior required deliberate prompting, making successful exploitation highly impractical in real-world scenarios. Furthermore, the edited file was still displayed in the UI as usual for user review, making it unlikely for the edit to go unnoticed by the user. ### Remediation Agent now requires explicit user confirmation before writing to out-of-workspace files. Separately, we recommend as best practice to only include trusted pieces of context in your prompts, as well as to always review the edits made by the agent.
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| Cursor Product | < 0.48.7+ | 0.48.7+ |
Details and references
- CVSS 3.1
- CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H
- Severity from
- GitHub (reviewed advisory)
- Weakness
- CWE-20
More Cursor advisories
All Cursor| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Aug 12025 | Arbitrary Image Fetch in Mermaid Diagram Tool | Medium4.4 | 1.3 |
| Aug 12025 | MCP Install Deeplink Did Not Show Arguments on User-Dialog | Medium | 1.3 |
| Aug 12025 | Modification of MCP Server Definitions Bypasses Manual Re-approval | High7.2 | 1.3 |
| Jun 192025 | IDOR in Usage API Leading to Unauthorized Data Exposure | Medium4.3 | 2025-06-17 |
| Jun 192025 | IDOR in Usage Events API Lets Users Access Teammates' Activity Data | Medium4.3 | 2025-06-17 |
| Jun 112025 | Potential Information Leakage using JSON schema in Cursor Agent | Medium5.9 | 0.51.0 |