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

> CVE-2026-50548: Cursor Desktop sandbox escape via agent-controlled working directory. CVSS 9.8 (CVSS 3.1).

Canonical: https://rewindex.com/cve/CVE-2026-50548
Last updated: 2026-06-26T16:51:25Z

- Published: 2026-06-25 18:47 UTC · Updated: 2026-06-26 16:51 UTC · Assigner: GitHub\_M
- CVSS: 9.8 (CVSS 3.1) · Severity: Critical · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- EPSS: 1.0%, 63th percentile (scored 2026-10-25)
- CISA KEV: no
- CWE: CWE-22

## 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.

## Affected vendors and products

- cursor: cursor

## Tracked companies

- [Cursor](https://rewindex.com/company/cursor.md)

## References

- [CVE record on cve.org](https://www.cve.org/CVERecord?id=CVE-2026-50548)
- [NVD entry](https://nvd.nist.gov/vuln/detail/CVE-2026-50548)
- [https://github.com/cursor/cursor/security/advisories/GHSA-3p48-7v9f-v5cw](https://github.com/cursor/cursor/security/advisories/GHSA-3p48-7v9f-v5cw)

---

_Sources: CVE records from the CVE Program (cve.org). CVE® is a registered trademark of The MITRE Corporation. (https://www.cve.org/) This product uses data from the NVD API but is not endorsed or certified by the NVD. (https://nvd.nist.gov/) Known Exploited Vulnerabilities catalog from CISA. (https://www.cisa.gov/known-exploited-vulnerabilities-catalog) EPSS scores from FIRST (Exploit Prediction Scoring System). (https://www.first.org/epss/)_


---
Canonical: https://rewindex.com/cve/CVE-2026-50548 · Markdown: https://rewindex.com/cve/CVE-2026-50548.md · JSON: https://rewindex.com/api/v1/cves/CVE-2026-50548 · Data licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) · Generated 2026-10-26T03:13:37.277Z
