STUPID-2026-0183

Cursor Desktop's sandbox let a workspace's hook configuration run commands on the host unsandboxed, enabling escape (CVE-2026-48124)

8.0high
May 21, 2026Source checkedRepro reported

Why 8/10

A design flaw in Cursor Desktop itself (not a single reported incident): a malicious or agent-written workspace file could run commands on the host outside the sandbox, which if exploited would reach the whole machine the agent runs on — scope 3, short of the "widely used product, mass exposure" band because it needs a malicious workspace opened rather than zero-click reach. Recoverability is scored for what successful exploitation would do (sandbox escape to arbitrary host commands is not undoable), consistent with how STUPID-2026-0090 and STUPID-2026-0096 scored this factor for fixed, no-known-victim CVEs. No exploitation in the wild has been reported, only a demonstrated PoC — realisation 1. The advisory lists local data access and credential exposure as a possible outcome — impact 1.

Scope
3/4
A whole machine or drive, an organisation's production system or data, or many credentials
Recoverability
3/3
Permanently lost or irreversible, including data that was exposed
Did it happen
1/2
Demonstrated (proof of concept, reproduction, controlled test or near-miss) with no real victim reported
Beyond the user
1/1
Production systems, customers or third parties, or credentials and sensitive personal data

The score is the sum of these four factors. How each factor is scored · scored 2026-12-02

Status and what to do

Affected
Cursor Desktop 2.4.37 and earlier.
Fix status
Fixed · Patched in Cursor 3.0.0: workspace-sourced hook commands now require approval and are subject to the same execution-policy controls as other agent shell commands.
Mitigation
Update to Cursor 3.0.0 or later; treat any hook/config file found in or written to a workspace as untrusted, executable input, not inert configuration. Source
Last reviewed
2026-12-02 · Report a correction to this record
  1. Instruction given

    N/A — this is a flaw in Cursor Desktop's own sandbox and hook-handling design, not a task a user asked the agent to perform.

  2. Expected behavior

    Hook commands defined in a workspace's config file should require explicit, dedicated user approval before running outside the sandbox, under the same execution-policy controls Cursor applies to any other agent shell command.

  3. Actual behavior

    Cursor Desktop could run hook commands defined in a workspace's `.claude/settings.local.json` without dedicated user approval. A malicious workspace, or a config file the sandboxed agent itself had written, could define hooks that ran local commands in the user's context on the unsandboxed host when an agent turn ended.

  4. Damage

    Per the advisory (CVSS 8.5, AV:L/AC:L/AT:N/PR:N/UI:P), a workspace exploiting this could achieve sandbox escape, persistence across agent turns, local data access, and follow-on compromise of the host. No in-the-wild exploitation has been reported; the finding was published as part of Pillar Security's "Week of Sandbox Escapes" research alongside similar sandbox-trust-boundary findings in OpenAI Codex and Google Gemini CLI.

Full write-up

Cursor's security advisory GHSA-pc9j-3qc2-95wv, published May 21, 2026, discloses that Cursor Desktop versions through 2.4.37 would run hook commands defined in a workspace's .claude/settings.local.json without requiring dedicated user approval. Because the agent itself can write files inside its own sandbox, a workspace could carry — or an agent could be steered into creating — a hooks config that ran arbitrary local commands in the user's context on the unsandboxed host once an agent turn ended, escaping the sandbox the feature was supposed to be confined to. Rated CVSS 8.5 (AV:L/AC:L/AT:N/PR:N/UI:P), the advisory lists sandbox escape, persistence across turns, local data access, and follow-on compromise as possible outcomes. It was fixed in Cursor 3.0.0, which now subjects workspace-sourced hook commands to the same execution-policy approval as any other agent shell command. The finding surfaced publicly as part of Pillar Security's July 2026 "Week of Sandbox Escapes" research, alongside comparable sandbox-trust-boundary bugs the same researchers reported in OpenAI's Codex and Google's Gemini CLI — a pattern of agent sandboxes trusting files the agent itself (or a malicious repository) can write.

Classification

Agent
Cursor
Root cause
Other
Domain
Security

Related incidents

Cite this record
StupidLLM. "STUPID-2026-0183: Cursor Desktop's sandbox let a workspace's hook configuration run commands on the host unsandboxed, enabling escape (CVE-2026-48124)." AI Agent Incident Database, 2026. https://www.stupidllm.com/incident/STUPID-2026-0183/ (accessed 2026-12-03). CC BY 4.0.

← STUPID-2026-0182By IDSTUPID-2026-0184 →

Get told when an agent breaks something

We document AI agent failures daily, severity-scored against a published scale. Each Monday, if any scored 7 or above that week — deleted data, leaked secrets, broken production — you get one email with the sources. When nothing did, you get nothing.

This database is callable over MCP — query it from inside your agent.