CVE-2026-50548: Cursor Desktop sandbox escape via agent-controlled working directory
Cursor is a code editor built for programming with AI. Prior to 3.0, Cursor runs agent terminal commands in a sandbox by default, and the sandbox grants write access to the command's working directory. A flaw was identified in how the agent could modify the workingdirectory parameter, which could cause the sandbox to include writable paths outside the intended workspace. A malicious agent could set workingdirectory to a sensitive location and write arbitrary files outside the workspace under the user's privileges. This enables non-sandboxed Remote Code Execution — for example by overwriting the cursorsandbox helper so later commands run unsandboxed — with no user interaction beyond a benign prompt. This vulnerability is fixed in 3.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Cursor Desktopto a version that resolves this vulnerability.Fixed in 3.0 - Compensating control
Upgrade to Cursor Desktop 3.0, which fixes the sandbox escape issue caused by agent-controlled modification of the working_directory parameter.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-50548?
The severity of CVE-2026-50548 is rated at 80, indicating a high level of risk.
How do I fix CVE-2026-50548?
To fix CVE-2026-50548, ensure you update Cursor Desktop to version 3.0 or later where the vulnerability is addressed.
What type of vulnerability is CVE-2026-50548?
CVE-2026-50548 is categorized as a Path Traversal vulnerability.
What could an attacker achieve with CVE-2026-50548?
An attacker could potentially escape the sandbox and modify files in directories controlled by the agent, leading to unauthorized access.
When was CVE-2026-50548 published?
CVE-2026-50548 was published on June 25, 2026.