Anysphere · Cursor · CVE-2026-50548
**Name of the Vulnerable Software and Affected Versions**
Cursor versions prior to 3.0
**Description**
Cursor is an AI-powered code editor that executes agent terminal commands within a sandbox. A flaw exists in how the agent handles the `working directory` parameter, allowing for sandbox path traversal. This occurs because the application fails to properly constrain the working directory to a safe root, enabling a malicious agent to modify the `working directory` to point to sensitive locations outside the intended workspace. Consequently, an attacker can write arbitrary files under the user's privileges, leading to a sandbox escape and non-sandboxed Remote Code Execution (RCE). This can be achieved by overwriting components such as the cursorsandbox helper, allowing subsequent commands to run without sandbox restrictions, requiring no user interaction beyond a benign prompt.
**Recommendations**
Update Cursor to version 3.0.