CVE-2026-50548: Cursor Desktop sandbox escape via agent-controlled working directory

Published Jun 25, 2026
·
Updated

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

2 affected components
Cursor Cursor Desktop<3.0
anysphere Cursor<3.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Cursor Desktop to a version that resolves this vulnerability.

    Fixed in 3.0
  2. 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

Jun 25, 2026
CVE Published
via MITRE·06:47 PM
Data Sourced
via MITRE·06:47 PM
DescriptionWeakness
Data Sourced
via NVD·07:16 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-50548?

The severity of CVE-2026-50548 is rated at 80, indicating a high level of risk.

2

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.

3

What type of vulnerability is CVE-2026-50548?

CVE-2026-50548 is categorized as a Path Traversal vulnerability.

4

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.

5

When was CVE-2026-50548 published?

CVE-2026-50548 was published on June 25, 2026.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203