CVE-2026-50548
Description
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 working_directory parameter, which could cause the sandbox to include writable paths outside the intended workspace. A malicious agent could set working_directory 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.
Description as published by the source, in English.
Key facts
- Published
- 2026-06-25
- Last modified
- 2026-06-26
- Assigned by
- security-advisories@github.com
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H- Scored by
- nvd@nist.gov (NVD Primary)
- Probability of exploitation
-
1.0 %
higher than 58 %
of all known vulnerabilities
EPSS, next 30 days, model v2026.06.15 - Fix available
- Not registered in the sources
Affected products
| Vendor | Product | Versions | Status |
|---|---|---|---|
| Anysphere | Cursor | < 3.0 | Affected |
Weakness type
-
CWE-22: Improper Limitation of a Pathname to a Restricted Directory
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special ele…
References
Related at Berigo
Articles
-
Cursor can execute a malicious file from a repository
Same product
2026-07-14
Mindgard has shown that Cursor on Windows can execute a malicious git.exe placed in a repository root without prompting the user.
-
AI-assisted malware development used to evade EDR detection
Same product
2026-06-02
Sophos describes how a threat actor used AI tools to build and test malware and detection evasion techniques, with human operators still directing th…
-
CursorJack: deep links abused to trigger unwanted actions in Cursor
Same product
2026-03-17
Proofpoint describes CursorJack, a technique abusing deep links and custom URI handlers in the Cursor IDE to trigger actions the user never intended.
-
AI coding tools recommend extensions that can be spoofed
Same product
2026-01-05
Koi found that Windsurf, Cursor and Google Antigravity recommend VSCode extensions missing from OpenVSX, leaving the names open to hijacking.
Does this affect you?
A vulnerability matters only if you run the product, in an affected version, somewhere an attacker can reach.