CVE-2026-50549 Cursor Desktop sandbox escape via symlink and failed path canonicalization

Critical 9.3 Published Updated

A malicious AI agent can escape the sandbox and execute arbitrary code by exploiting symlink handling flaws during file writes.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2026-50549?

CVE-2026-50549 is a critical path traversal vulnerability in cursor, published on 25 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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. 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. A malicious agent can create an in-workspace symlink that points outside the workspace and force canonicalization to fail — either because the target does not exist or because read permission is removed from the path — so the agent writes through the symlink to an arbitrary location without approval. A malicious agent could 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.

Weakness: CWE-59

Which versions are affected by CVE-2026-50549?

It affects 1 product.

Products include Anysphere Cursor.

How do I fix CVE-2026-50549?

No fix has been published for CVE-2026-50549 yet. Limit exposure of the affected software until one is available.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-50549 being exploited?

There is no known exploitation of CVE-2026-50549 in the wild and no public exploit code.

Sources

Is CVE-2026-50549 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free