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

CVE-2026-50548 · Severity: info · CVSS 9.3 · Published 2026-06-25

Cursor is an AI-powered code editor used by developers to write and manage software. A security flaw allowed the AI agent to bypass its safety sandbox and write files to sensitive locations on the user's computer. This could allow a malicious agent to take full control of the user's system and execute unauthorized commands without any interaction from the user beyond a standard prompt.

Technologies: Anysphere Cursor. Vendors: Anysphere.

Quick answers

Is CVE-2026-50548 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-50548 being exploited in the wild.
How severe is CVE-2026-50548?
Informational severity, with a CVSS score of 9.3, published 25 June 2026.
Which products and versions are affected?
Anysphere Cursor < 3.0.
Is there a fix for CVE-2026-50548?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2026-50548 attacked?
It is attacked over the network, in a network appliance.
Am I affected by CVE-2026-50548?
Check whether you run Anysphere Cursor at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

A path traversal vulnerability (CWE-22) exists in Cursor versions prior to 3.0. The application's AI agent runs terminal commands within a sandbox that automatically grants write access to the command's working directory. However, the agent could manipulate the 'working_directory' parameter to point to sensitive locations outside the intended workspace. An attacker could exploit this to overwrite critical system or application files, such as the 'cursorsandbox' helper, leading to full escape from the sandbox and non-sandboxed Remote Code Execution (RCE) under the privileges of the local user. This issue is resolved in version 3.0 by removing write access based on agent-controlled directory parameters.

Affected products

  • Anysphere (Cursor) Cursor < 3.0

Timeline

  • 2026-06-05: advisory: GitHub advisory published by vendor
  • 2026-06-25: disclosed: CVE published to NVD

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.