Skip to content
Submit incident
AII-1001-88481
ConfirmedA court, a regulator or the organization itself has stated the core facts, or the record cites a court or regulator source.Supporting sources are pending verification.

Cursor Agent arbitrary file write via prompt injection in @Docs

A regression in Cursor versions 0.45.0-0.48.6 allowed the Cursor Agent to write files outside of the opened workspace through prompt injection in maliciously crafted @Docs content. The vulnerability required deliberate prompting and was patched in version 0.48.7.

7 April 2025 Β· Cursor Β· Security and cyberattacks
7 April 2025
AII-1001-88481
Quick facts
Organization
Cursor (subject)
Category
Security and cyberattacks
Date
7 April 2025
Drafted by
Raidu Incident Detection

What happened

A regression in Cursor versions 0.45.0 through 0.48.6 allowed the Cursor Agent to write files outside of the opened workspace when prompted directly by users or via maliciously crafted context in @Docs features.

The vulnerability required deliberate prompting to exploit and displayed edited files in the UI for user review before writing.

Reported impact

An attacker could cause the agent to automatically write to files outside the intended workspace.

Index analysis

The vulnerability stemmed from improper input validation (CWE-20) in the Cursor Agent's file path restrictions.

Cursor patched the issue in version 0.48.7 by requiring explicit user confirmation before writing to out-of-workspace files.

Governance controls

Cursor recommends users only include trusted pieces of context in prompts and always review edits made by the agent.

Classification

Organization
Cursor (subject)
Category
Security and cyberattacks
Harm status
Potential harm
Intent
Unintentional
Timing
Post-deployment
Harmed
Consumers
Failure modes
Agent misaction, Prompt injection, Unsafe autonomous behaviour
AI systems
Cursor Agent

Sources and evidence

Sources not yet published

This record was researched and written by the Index from original reporting. Its sources are still being verified by an editor, and they are listed here once that check is complete. Until then the record carries no reviewer.

How sources are verifiedSuggest a source for this incident