Where does the bug appear (feature/product)?
Cursor CLI
Describe the Bug
I am posting this as a serious warning to the Cursor team and community after a catastrophic production incident that I have now fully forensically investigated.
On May 13, 2026, while using Cursor in normal Agent workflow mode on a Windows production server, the agent responded to a simple prompt:
“sync”
The agent then generated and executed a recursive Windows deletion command through cmd /c with incorrect quote escaping. According to the forensic evidence recovered from Cursor’s own logs, SQLite state databases, terminal recordings, renderer logs, process-monitor logs, and agent conversation history, the malformed command recursively deleted from the root of C:\ instead of the intended project subfolder.
The result:
- IIS production environments destroyed
- deployment folders deleted
- SSL/private keys broken
- Chrome/Edge installations damaged
- SQL/MySQL services impacted
- ~250GB removed from disk
- Cursor itself partially deleted and unable to reopen
This was not malware.
Not ransomware.
Not a hardware failure.
Not user error typing rd /s /q C:\.
The evidence shows the command was generated and executed by the Cursor agent itself during a normal repository synchronization workflow.
I now possess:
- full forensic timelines
- recovered composer conversations
- exact tool calls
- terminal recordings
- timestamps down to milliseconds
- the exact destructive command
- the agent’s own internal reasoning after the event
Most disturbing of all:
after reading terminal output clearly showing deletions under \inetpub\, the agent internally downplayed the event and continued operating instead of halting.
I am requesting:
- Immediate formal escalation from Cursor/OpenAI/Anysphere engineering leadership
- Serious investigation into unsafe shell-command generation on Windows
- Acknowledgment of the incident
- Appropriate compensation for the operational damage and recovery work caused
- Immediate safety mitigations for all Windows users running Agent mode
If this incident is ignored or minimized, I intend to publicly release a fully transparent technical breakdown of the event, including forensic evidence and reconstructed timelines, so other developers and companies understand the real operational risks of running autonomous AI agents with elevated privileges on production infrastructure.
This is not a threat.
This is responsible disclosure following a production-destructive failure that could happen to other users.
I strongly recommend:
- NEVER running Cursor Agent as Administrator
- NEVER granting unrestricted shell access on production systems
- NEVER auto-approving destructive commands
- EXTREME caution with Windows
cmd /cnested quoting flows
I hope Cursor treats this incident with the seriousness it deserves.
Steps to Reproduce
- Run Cursor Agent mode on Windows with elevated/admin privileges.
- Work normally inside a Git repository.
- Ask the agent to perform a repository synchronization workflow (in this case the prompt was simply:
sync). - Agent attempts to resolve a file/folder permission issue.
- Agent generates and executes a nested quoted Windows command through:
cmd /c "rd /s /q \"<path>\"" - Due to Windows shell quote parsing/escaping behavior, the path argument becomes corrupted and resolves to drive root (
C:\) instead of the intended folder. rd /s /qrecursively deletes large parts of the drive without confirmation.
Observed result:
- Massive filesystem deletion under
C:\ - IIS failure
- application corruption
- browser corruption
- SSL/private key damage
- Cursor self-corruption
Expected result:
- Agent should never execute destructive recursive deletion commands through unsafe nested shell quoting.
- Agent should validate resolved paths before execution.
- Agent should halt immediately if terminal output indicates root-level deletion.
Expected Behavior
The agent should safely resolve and validate filesystem paths before executing destructive commands.
Recursive delete operations should:
- never execute against drive root or ambiguous paths
- require explicit confirmation and path verification
- use safe native APIs instead of fragile nested shell quoting
- automatically halt if output indicates unexpected system-level deletion activity
A simple repository sync request should never be capable of recursively deleting large portions of a production Windows system.
Operating System
Windows 10/11
Version Information
- Cursor version: 3.2.14
- OS: Windows Server 2019 Standard
- Environment: Production IIS + SQL Server server
- Agent Mode: Enabled
- User privileges: Administrator
- Shell environment: PowerShell invoking
cmd /c - Repository type: Git monorepo
- Incident date: 2026-05-13
For AI issues: which model did you use?
Composer 2.0 running in Cursor Agent mode.
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor