Skip to main content
[← back to blog]

Cursor security risks in 2026: the sandbox became the target

Seven of the nine security advisories Cursor published in 2026 are sandbox escapes, including DuneSlide, two critical zero-click bugs it fixed within six weeks. The settings that stop a cloned repository from steering your agent are still yours to set.

Apr 30, 20268 min readUpdated Oct 31, 2026

On February 19, 2026, Cato AI Labs sent Cursor two vulnerability reports. Four days later both were rejected: by Cato's account, Cursor's threat model did not cover misuse of an MCP server, even a standard one like the official Linear workspace. Cato escalated to Cursor's security team on February 26, and the team reopened both.

Reopening them was the right call. The two bugs, which Cato named DuneSlide, are now CVE-2026-50548 and CVE-2026-50549. Cursor rates both critical, and Cato scored both 9.8. Neither needs a click: a developer asks the agent something ordinary, the answer pulls in attacker-written text from an MCP server or a web search result, and the agent is steered into writing outside the project.

In the first bug, the agent could choose its own working directory, and the sandbox granted write access to wherever it pointed. In the second, a symlink inside the project led out of it, and when Cursor's path check failed it fell back to trusting the link. Either way the agent could overwrite the sandbox's own helper program, and every command after that ran with no sandbox at all.

How DuneSlide turned an ordinary prompt into an unsandboxed shell
  1. 01
    Ask
    A developer gives the agent a routine request.
  2. 02
    Ingest
    An MCP result or a web search page carries attacker-written instructions.
  3. 03flagged
    Write
    The agent writes outside the project through a path the sandbox trusted.
  4. 04flagged
    Disarm
    The sandbox's own helper program is overwritten.
  5. 05flagged
    Run
    Later commands in the session run with no sandbox.

Both fixes shipped in Cursor 3.0 on April 2, six weeks after the first report. Cursor published the advisories on June 5, and Cato published its write-up on July 1.

The DuneSlide disclosures
  1. Cato AI LabsJul 1, 2026
    Report
    DuneSlide: Two Critical RCE vulnerabilities via Zero-Click Prompt Injection in Cursor IDE

    “Both RCE vulnerabilities, which we refer to as “DuneSlide,” achieved a 9.8 CVSS score, and involve breaking out of the IDE's sandbox environment.”

    Read the source
  2. CursorJun 5, 2026
    Advisory
    Cursor Desktop sandbox escape via agent-controlled 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.”

    Read the source
  3. CursorJun 5, 2026
    Advisory
    Cursor Desktop sandbox escape via symlink and failed path canonicalization

    “Before a Write, the agent canonicalizes the target path to confirm it stays inside the workspace, but when canonicalization fails it falls back to the original path and writes without approval.”

    Read the source

Cursor security risks in 2026 were mostly sandbox escapes

DuneSlide was not a one-off. To its credit, Cursor publishes its advisories in its own GitHub repository. Of the 33 published there as of October 31, nine came out in 2026, and seven of those nine are sandbox escapes. The other two are ways around the terminal allowlist.

Researchers followed the trust. Cursor 2.x, Cato notes, ran terminal commands in a sandbox automatically by default, and Cursor's February 18 engineering post gives the reason: "Sandboxed agents stop 40% less often than unsandboxed ones." That is a real gain, and it moved the line of defense from a person reading each command to a policy the agent works inside. The policy became the target.

Cursor's 2026 advisories, by publication date
  1. Jan 14
    CVE-2026-22708: allowlist bypass through environment variables
    Fixed in 2.3
  2. Feb 13
    CVE-2026-26268: sandbox escape through Git hooks
    Fixed in 2.5
  3. Mar 9
    CVE-2026-31854: allowlist bypass steered by a web page
    Fixed in 2.0
  4. May 21
    CVE-2026-48124: sandbox escape through Claude hook settings
    Fixed in 3.0
  5. Jun 5
    CVE-2026-50548 and CVE-2026-50549: DuneSlide
    Critical, zero-click, fixed in 3.0
  6. Jul 6
    CVE-2026-61613: Cloud Agent browser sandbox escape
    Fixed on Cursor's side on March 31
  7. Jul 14
    CVE-2026-73218: escape through a privileged Docker container
    Listed as affecting versions before 3.0
  8. Jul 14
    CVE-2026-73217: escape through a tampered Python environment
    Fixed in 3.1.2

The escapes share a shape. The agent writes something the sandbox allows, and a program outside the sandbox later runs it. Git runs a hook. Cursor ran hook commands from a workspace's Claude settings file. Microsoft's Python extension runs a virtual environment's interpreter. Docker Desktop launches a privileged container. DuneSlide is the purest case: the next command runs through a helper the agent replaced. The sandbox contains the agent's commands, but nothing contains the programs that later trust what those commands left behind.

What Cursor fixed, and what it left writable

Several fixes became rules the sandbox enforces. Cursor's sandbox reference lists paths that are write-protected "regardless of your sandbox.json configuration," and most entries on it match a published advisory. .git/hooks/** and .git/config match the Git-hook escape, and .claude/**/*.json the Claude hook one. .code-workspace, .vscode/**, .cursorignore and .cursor/**/*.json match 2025 bugs, among them CVE-2025-54135, which let an injected agent create a missing project mcp.json and add a server that ran its code.

The same reference lists what stays writable inside .cursor: rules/, commands/, skills/, agents/ and worktrees/. Those folders mostly hold instructions for the agent, and the sandbox lets the agent edit them. In March 2025, Pillar Security showed rules files carrying instructions hidden in invisible Unicode, and Cursor's answer then was that "this risk falls under the users' responsibility." A prompt-injected agent that writes a rule leaves instructions for later sessions.

What Cursor's defaults do today

The Run Modes page lists three modes under Settings > Agents > Approvals & Execution: Auto-review, Allowlist and Run Everything. Cursor 3.5 deprecated Ask Every Time on May 22, 2026, and a week later Auto-review "shipped as the recommended default" in 3.6. It runs allowlisted calls at once and shell commands in the sandbox when it can, and sends the rest to a classifier on Cursor's backend, as of October 2026, Gemini 3.5 Flash Lite with Claude 4.5 Haiku as the fallback. A command that fails on a sandbox restriction can be rerun outside it if the classifier agrees.

Cursor is candid about that classifier, under a heading that reads "Auto-review is not a security boundary."

The classifier can make mistakes. It can allow a call you would have blocked, or block a call you would have allowed.

Cursor, Run Modes documentation, October 2026

The Agent Security page still says "by default, terminal commands need your approval," so check what a fresh install does before you write the policy. It is unambiguous on edits: the agent "can modify workspace files without approval, except for configuration files," and "changes save immediately to disk." Reads outside the workspace need no approval either, unless you pick the Workspace read mode that arrived in 3.23 on October 1. Under the default, the sandbox reference says ~/.ssh is "always readable" to sandboxed commands.

Sandboxed network access is denied unless allowed, and the default mode adds Cursor's list for package managers, including *.googleapis.com and *.cloudflarestorage.com, where cloud storage buckets live. Cursor's own Cloud Agent docs warn against wildcarding an S3 region, because "the wildcard opens egress to every bucket in the region and creates an exfiltration path for a prompt-injected agent." The defaults deserve the same scrutiny. Private addresses and the cloud metadata endpoint are blocked by default, which is right. Workspace trust is off by default, and for an untrusted repository Cursor says to "use a basic text editor instead."

A repository can configure the agent that opens it

Every control above has a file, and the file can live in the repository. Per the permissions.json reference, Cursor reads ~/.cursor/permissions.json and .cursor/permissions.json in the workspace, and "when both exist, Cursor concatenates the arrays inside every field." So a repository's terminalAllowlist entries take effect on your machine, joining your own file's entries or replacing the allowlist in your settings, and its allow_instructions steer your classifier.

A repository's .cursor/sandbox.json takes priority over your own, and its writable paths and network allow entries are added to yours. Project hooks in .cursor/hooks.json are commands checked into the repository, and CVE-2026-48124 was Cursor running hook commands from a workspace's .claude/settings.local.json "without dedicated user approval." Rules in .cursor/rules and AGENTS.md are instructions by design.

Who sets the agent's limits
What a cloned repository can add
  • Terminal allowlist entries
  • Auto-review allow_instructions
  • Sandbox writable paths and network domains
  • Project hooks
  • Rules and AGENTS.md
What a team admin can pin
  • Run Mode controls that files cannot extend
  • A network allowlist that replaces the union
  • A Workspace read policy for every member
  • Hooks shipped by MDM or the dashboard
  • An MCP allowlist (Enterprise)

Cursor documents this plainly, and it is how teams share settings. It also means cloning a repository changes your agent's configuration, and only team-level controls, several of them Enterprise-only, override a repository's files.

Cloud Agents never ask

Cloud Agents run in isolated VMs on Cursor's AWS infrastructure, where Run Modes do not apply: "the agent never asks you to approve an action." The Secrets and Network page adds that the agent "auto-runs all terminal commands" and "has internet access by default," and that "auto-running introduces data exfiltration risk." It works through Cursor's GitHub App with the read-write access you granted.

In July, Cursor published CVE-2026-61613: in browser-enabled sessions, attacker-controlled web content could reach an unauthenticated local agent endpoint and run code in the session, with access to its files, environment variables, credentials and GitHub App token. A lead product security engineer at Thomson Reuters reported it, and Cursor fixed it in its own environment on March 31, with nothing for Cursor-hosted customers to do.

For your data inventory, Cursor's Cloud Agent security page says VM snapshots, which include cloned code, last a rolling 30 days of inactivity and cannot be deleted on demand. Conversations are kept indefinitely unless an Enterprise admin sets a 90-day cap.

What to lock down before rollout

Start from Cursor's hardening guide, which gets the layering right: steering "belongs with these, never instead of them," meaning the hard boundaries. Then own these.

  • Pin Run Mode at team level. Once the dashboard controls Run Mode, no permissions.json can add allowlist entries, and a team Auto-review configuration makes Cursor ignore the user and project files. Use Auto-review with a team configuration that names what must always reach a person, or Allowlist with a short team allowlist. Never Run Everything.
  • Set a team network allowlist. It replaces the union of user and repository lists and covers both the desktop sandbox and Cloud Agents. Choose sandbox.json Only on the desktop and Allowlist only for Cloud Agents so Cursor's default domains stay out, and list your own registries or mirror.
  • Make reads ask first. On Enterprise, turn on Read Controls under Team Settings > Security & automation and choose Workspace (Cursor 3.23 or later). Do it there, because a repository's sandbox.json replaces a user's readBoundary, while a team Workspace policy "applies to everyone."
  • Ship hooks that fail closed. Put beforeShellExecution, beforeMCPExecution and beforeReadFile hooks in the MDM-managed hooks.json (/Library/Application Support/Cursor/ on macOS, /etc/cursor/ on Linux, C:\ProgramData\Cursor\ on Windows), deny with exit code 2, and set "failClosed": true, because otherwise a hook that crashes or times out lets the action through. Dashboard hooks cannot take that option. On Enterprise, also turn on Block until hooks are ready.
  • Turn on the Enterprise MCP allowlist. For a local server it matches the full command string, so a changed command under an approved name no longer matches. Give each local server the Allowlist or Deny all network mode. The MCP security checklist has the rest.
  • Set the Marketplace Install Cooldown. It defaults to 0. Set in hours under Security & automation, it holds each extension install and update until that version has been public that long. Tampered builds of the Claude Code extension sat in Cursor's marketplace for about eleven hours on October 29, per Cursor's notice (our supply-chain post has the story), so a 24-hour cooldown would have kept both off every machine that enforced it.
  • Review .cursor/, .claude/ and AGENTS.md like CI configuration. Put CODEOWNERS on them, and read what changed in .cursor/rules/ after an agent session.
  • Keep Cloud Agents off repositories that can deploy, or scope the GitHub App narrowly and use OIDC federation in place of long-lived cloud keys.
  • Hold a version floor of 3.23. It includes every 2026 sandbox fix that lists a version, plus the Workspace read policy.

None of this tells you what the agent did. Cursor's hardening guide calls Auto-review, allowlists and .cursorignore best-effort, scopes its audit logs to authentication and admin events, and points to hooks for agent activity. Hooks see what the agent asks to do. Most of 2026's escapes happened after that: Git ran a hook, an extension ran an interpreter, a later command ran through a replaced helper.

Catching that class takes a record from the machine itself: which process wrote to the editor's own files, and what Git or an extension ran next. Quint keeps that record at the operating system of each developer machine, for every agent on the machine and with no change to the agent, and scores the sequence on the device. To see it on a real session, book a demo.

Related reading

Your agents are running. See what they're actually doing.

Book a demo