Skip to content

Dappasol / Guides

By , Founder · Updated October 2026

Is Cursor Safe? Security Risks, Known CVEs and the Settings That Fix Them

Quick answer: Cursor is safe to install and use if you keep it updated, turn on Workspace Trust, keep the agent in Auto-review mode with the sandbox on, and enable Privacy Mode. Cursor has published more than a dozen security advisories against itself since 2025 and fixed nearly all of them fast. The code it writes still needs a security review before real users touch it.

Is Cursor safe? That question hides three different ones. Is the Cursor app safe to put on my laptop? What has actually gone wrong with it? And is the code it writes safe to ship? This guide answers all three with sources you can click, then gives you the exact settings to change. If you only do one thing: update Cursor, open user settings.json, and add "security.workspace.trust.enabled": true. That closes the oldest open hole.

Is Cursor safe to use?

Yes, with three caveats that matter more than any marketing page.

Caveat one: it is an agent, not an autocomplete. Cursor's agent can read your files, write new ones, run terminal commands, and call third-party tools over MCP. Cursor's own security docs say the AI "can behave unexpectedly due to prompt injection, hallucinations, and other issues." Every serious Cursor vulnerability in the table below is a variation on one theme: text the agent reads (a repo file, a Slack message, a rules file) turns into something the agent does. Treat anything you open in Cursor as input to a program that can run commands.

Caveat two: some safety defaults are off. Cursor's docs state plainly that "Cursor supports workspace trust, but it's disabled by default." That is the VS Code feature that stops a cloned repo from running code the moment you open the folder. VS Code ships it on. Cursor ships it off. You turn it on yourself (step 2 of the checklist).

Caveat three: the company side is fine. Cursor publishes a SOC 2 Type II attestation, ISO/IEC 27001:2022, ISO/IEC 42001:2023 and AIUC-1 on its security page, with reports available through its trust portal. It states it has no infrastructure in China and no China-headquartered subprocessors. It has a disclosure address (security-reports@cursor.com) and a public advisory list on GitHub where it publishes CVEs against itself. That last one is a good sign. Vendors that hide their CVEs are the ones to worry about.

So the editor itself is safe enough for a solo founder and, with admin enforcement, for a team. What is not safe is the default posture: Workspace Trust off, untrusted repos opened freely, and "Run Everything" mode switched on because the prompts were annoying. That combination is how most of the issues below become real.

One more thing searchers ask: "is macursor safe". There is no official product called MaCursor. Cursor's macOS build is downloaded from cursor.com. If a site with a similar name is offering a download, it is not Cursor. Get the installer from the official domain only.

Cursor security risks (known vulnerabilities)

Here is every Cursor security issue we could verify against a primary source: Cursor's own GitHub advisories, the CVE record, or the researcher's original write-up. Where a number or date could not be verified, it is not in the table.

IssueWhat it doesFixed in / statusWhat you do
Rules File Backdoor
Pillar Security, disclosed to Cursor Feb 26, 2025
Invisible Unicode (zero-width joiners, bidi markers) hidden in a .cursor/rules file steers the agent into writing malicious code. Human reviewers see blank space. The file travels with the repo through forks.No CVE. Cursor said the risk "falls under the users' responsibility." No product fix.Review rules files like code. Scan .cursor/rules and .cursorrules for hidden characters before trusting a template or PR.
CurXecute
CVE-2025-54135, CVSS 8.5 (Cursor) / 8.6 (CVE record)
Agent could create a new .cursor/mcp.json without approval (editing one required approval, creating one did not). Chained with a prompt injection, say from a Slack message read over MCP, that gave remote code execution.Fixed in 1.3.9. Advisory GHSA-4cxx-hrm3-49rm.Update. Be careful which MCP servers pull untrusted text (Slack, email, web) into the agent.
MCPoison
CVE-2025-54136, CVSS 7.2
Cursor tied MCP approval to the server's name, not its command. Approve a harmless entry once and a collaborator could swap the command for a reverse shell with no new prompt. Persistent code execution every time the project opened.Fixed in 1.3 (July 29, 2025). Advisory GHSA-24mc-g4xr-4395.Update. Any change to an MCP config now re-prompts. Read what you approve.
Workspace Trust off by default
Oasis Security, Sept 10, 2025
A repo containing .vscode/tasks.json with "runOn": "folderOpen" runs commands the instant you open the folder. VS Code blocks this until you trust the workspace. Cursor ships the feature disabled.No CVE. Still off by default per Cursor's security docs.Add "security.workspace.trust.enabled": true to user settings.json. Set task.allowAutomaticTasks to off.
Sensitive-file bypass via case sensitivity
CVE-2025-59944, CVSS 8.0
Protection for files like .cursor/mcp.json used case-sensitive checks. On a case-insensitive filesystem (macOS by default) a differently cased path slipped past and could lead to RCE.Fixed in 1.7. Advisory GHSA-xcwh-rrwj-gxc7.Update.
MCP deep-link warning bypass
CVE-2025-64106, CVSS 8.8
A crafted install link looked like a Playwright MCP server install but skipped the security warning and ran arbitrary commands when accepted.Fixed in 2.0. Advisory GHSA-4575-fh42-7848.Update. Do not install MCP servers from links in chats or docs.
.cursorignore bypass
CVE-2025-64110
The agent could write a new .cursorignore that overrode existing ones, then read files you had told it to ignore.Fixed in 2.0. Advisory GHSA-vhc2-fjv4-wqch.Update. Keep real secrets out of the workspace entirely.
Allowlist bypass via environment variables
CVE-2026-22708
In Allowlist run mode some shell built-ins ran without being on the allowlist. A prompt injection could change env vars that trusted commands rely on.Fixed in 2.3. Advisory GHSA-82wg-qcm4-fp2w.Update. Prefer Auto-review over a bare allowlist.
Sandbox escape via Git hooks
CVE-2026-26268, CVSS 8.0
Agent could write to under-protected .git settings including hooks. Git runs hooks automatically, outside the sandbox.Fixed in 2.5. Advisory GHSA-8pcm-8jpx-hv8r.Update.
Sandbox escape via Claude hook config
CVE-2026-48124, CVSS 8.5
Cursor ran hook commands from a workspace's .claude/settings.local.json without approval. A sandboxed agent could plant a Stop hook that ran on the host when its turn ended.Fixed in 3.0.0. Advisory GHSA-pc9j-3qc2-95wv.Update. Treat .claude/settings*.json as executable config in code review.
Two critical sandbox escapes
CVE-2026-50548 and CVE-2026-50549 (Cato AI Labs)
One: the agent could set its own working_directory and get write access outside the workspace, enough to overwrite the sandbox helper itself. Two: a symlink whose target failed to resolve made Cursor fall back to writing the raw path, outside the workspace.Both fixed in 3.0. Advisories GHSA-3p48-7v9f-v5cw and GHSA-3v8f-48vw-3mjx.Update. This is the one where being on 2.x matters most.
Sandbox escape via tampered Python venv
CVE-2026-73217 (Pillar)
On macOS the sandboxed agent swaps a venv's bin/python for a wrapper. The Python extension, running outside the sandbox, executes it on the host.Fixed in 3.1.2. Advisory GHSA-p9g2-cr55-cw9c.Update.
Sandbox escape via privileged container
CVE-2026-73218 (Pillar)
With Docker Desktop installed and Auto-Run network access on, the agent could launch a privileged container that mounts your home directory and run host commands.Affects versions below 3.0.0. Advisory GHSA-v4xv-rqh3-w9mc, July 14, 2026.Update. Leave sandbox network mode on the default, not "Allow All".

Read the table as a pattern, not a list. Four of the thirteen are "a file in the workspace got executed by something outside the sandbox" (Git hooks, Claude hooks, venv, Docker). Three are "the agent wrote a config file it should not have" (CurXecute, case sensitivity, cursorignore). Two are "the approval prompt was weaker than it looked" (MCPoison, deep link). Pillar Security's July 2026 research framed the whole class as a trust handoff problem: the sandbox did its job, then a trusted component outside it ran what the sandbox had written. Expect more of these. The fixes are quick, which is exactly why staying current is the single highest-value setting.

Also note what the sandbox is and is not. Cursor's run-modes doc says the Auto-review classifier "is not a security boundary" and describes run modes as "best-effort guardrails rather than a hard security boundary." Cursor is telling you this. Believe it.

How to secure Cursor: settings checklist

Ten minutes. Do them in order. Setting names are as they appear in Cursor's docs as of October 2026.

  1. Update to the current version. Cursor, then Check for Updates. Everything in the table above is fixed at 3.1.2 or later. If your team pins versions, the enterprise MDM policy is UpdateMode.
  2. Turn on Workspace Trust. Open your user settings.json (Command Palette, "Preferences: Open User Settings (JSON)") and add "security.workspace.trust.enabled": true. New folders will now ask: normal or restricted. Restricted mode disables most AI features, which is the point for a repo you just cloned from a stranger. Cursor's own advice for untrusted repos is blunter: "use a basic text editor instead."
  3. Block automatic tasks. In the same settings.json add "task.allowAutomaticTasks": "off". This is the specific setting Oasis Security recommended against the folderOpen attack, and it costs you nothing.
  4. Set the run mode to Auto-review. Settings, then Agents, then Approvals & Execution. Pick Auto-review. It runs allowlisted calls, sandboxes shell commands when it can, and sends everything else to a classifier. Never pick Run Everything. Cursor's doc describes it as for people who "accept the risk and want zero prompts." That is a description of an incident report.
  5. Leave the sandbox on, and leave its network mode alone. The default network mode is "sandbox.json + Defaults" (your allowlist plus common package managers). "Allow All" is the switch that turned the Docker escape above from theoretical to practical. If you need a domain, add it to .cursor/sandbox.json instead.
  6. Turn on Privacy Mode. Cmd+Shift+J (Ctrl+Shift+J on Windows and Linux), General, toggle Privacy Mode. With it on, Cursor says your code "is never used for training by Cursor or other AI model providers" and that it holds zero-data-retention agreements with its providers. Off, Cursor "may use and store codebase data, prompts, editor actions, code snippets" to train models. It is on by default for Teams and Enterprise. On an individual plan, check it yourself.
  7. Write a .cursorignore for anything secret. Same syntax as .gitignore. Cursor already ignores .env*, .git/, lock files and node_modules/ by default. Add service-account JSON, private keys, customer exports, anything regulated. Know the limit: the ignore file governs Agent, Tab and @ mentions. Cursor's docs say it "can't restrict the terminal or MCP server tools." A cat .env still works. Keep real secrets outside the workspace.
  8. Approve MCP servers one at a time, and read them. Every MCP connection needs approval, and after MCPoison any edit to an entry re-prompts. The prompt is only useful if you read the command in it. Do not install MCP servers from deep links in chats, issues or docs (CVE-2025-64106 was exactly that). Pre-approve tools you trust in the MCP allowlist rather than reaching for Run Everything.
  9. Add block rules to permissions.json. In ~/.cursor/permissions.json (all projects) or <project>/.cursor/permissions.json (one project), write plain-English block_instructions: no deleting branches, no pushing to main, no touching anything under infra/. The classifier reads these. It is best effort, but it is cheap insurance.
  10. Review four file types in every PR as if they were shell scripts. .cursor/rules/* and .cursorrules (Rules File Backdoor), .vscode/tasks.json (folderOpen), .cursor/mcp.json (MCPoison, CurXecute), .claude/settings.json and .claude/settings.local.json (CVE-2026-48124). Codacy published a Semgrep rule called detect-invisible-unicode for the first one. GitHub now flags hidden Unicode in its diff view. Use both.
  11. Do not bring your own API key if you are relying on ZDR. Cursor's privacy page: "ZDR doesn't apply when you use your own API keys." Your data handling then follows your provider's policy, and the request still goes through Cursor's backend.

That is the whole checklist. Nothing on it slows you down beyond an extra prompt when you open a strange repo.

Cursor security best practices for teams

A solo founder asks "will my laptop get owned". A team asks "which of my twelve laptops is on Run Everything with Privacy Mode off". Different problem, and the fix is enforcement, not advice. Cursor's enterprise hardening guide lists the levers. In priority order:

  • Enforce Privacy Mode from the dashboard. Teams and Enterprise admins can lock it on so "members cannot disable it." Pair it with the Allowed Team IDs MDM policy so nobody signs into a personal account on a company machine and quietly drops out of the policy.
  • Set an org Run Mode policy. Auto-review, with sandboxing on. Remove Run Everything from the menu entirely. One developer's "I turned off the prompts" is everyone's breach.
  • Run an MCP allowlist. Approve servers centrally, restrict per-server tools and network modes. MCP servers are executables your editor runs. The approval list belongs with security, not with each developer's mood that afternoon.
  • Allowlist extensions. The Allowed Extensions policy blocks everything not listed. Add a cooldown on new installs with signature verification. Two of the 2026 escapes went through extensions (Python, Git) that ran agent-written files on the host.
  • Push Workspace Trust through MDM. Cursor says organizations "can enforce this setting through MDM solutions." Do that rather than asking forty people to edit a JSON file.
  • Keep clients current with UpdateMode. Count the fixed versions in the table: 1.3, 1.3.9, 1.7, 2.0, 2.3, 2.5, 3.0, 3.1.2. A team on an old build carries every one of those.
  • Restrict BYOK. If your security review relied on Cursor's ZDR agreements, personal API keys walk straight around them.
  • Stream audit logs. Authentication and admin events can go to your SIEM, a webhook or S3. If you cannot answer "who changed the run mode policy and when", you do not have a policy.
  • Treat .cursorignore as hygiene, not a control. Cursor's own hardening doc says to pair it with approvals and file permissions because terminal and MCP tools cannot honor it. Secrets live in a vault, not in a workspace folder with a note asking the model not to look.

Write this into a one-page AI coding policy: rules files get reviewed like code, MCP servers come from the allowlist, updates are mandatory, Run Everything is banned. Four lines. Most companies using Cursor have zero of them.

Is the code Cursor writes secure?

Not by default, and this has nothing to do with Cursor specifically. Cursor runs the same frontier models as every other assistant, so its output inherits their security habits. Veracode's 2025 GenAI Code Security Report (July 30, 2025) ran 80 code-completion tasks across more than 100 LLMs and found the models introduced an OWASP Top 10 vulnerability in 45% of test cases. When given a choice between a secure and an insecure way to do something, they picked insecure 45% of the time. For cross-site scripting specifically, they failed 86% of the time. Veracode's own line: models are getting better at writing correct code and not getting better at writing secure code.

One honesty note on that number. It is a share of benchmark tasks with a known security trap, not "45% of all code Cursor writes is vulnerable." Your real rate depends on what you ask for. But the categories are consistent, which is what makes them auditable. From our own audits of AI-built apps, they cluster here:

  • Broken access control. Tables scaffolded with no row-level security. Authorization checks that only exist in the React component. Change an ID in the URL, read someone else's data.
  • Exposed secrets. Keys prefixed NEXT_PUBLIC_ or VITE_ and shipped in the browser bundle. Keys committed to git on the first push, then "removed" in a later commit that does not remove them from history.
  • Injection and XSS. Handlers that trust input. Raw HTML rendered from user content. SQL built with string concatenation because the prompt said "quick".
  • Misconfiguration. Verbose errors in production, debug endpoints left open, CORS set to * because it fixed the error.

Cursor is actually in a better position than most tools here: it is an editor, so a real engineer can read the diff. The risk is not that Cursor writes a vulnerable line. It is that the line looked fine in a 400-line agent diff you approved at 1am. Cursor added a Security Review feature in September 2026 that posts one review comment per pull request covering injection, auth bypasses, committed secrets and SSRF. Turn it on. Then still have a human read the authorization logic, because scanners find patterns and your business rules are not a pattern.

For the full method, see how to audit AI-generated code for security and the background on AI-generated code security risks. If your codebase touches health or payment data, the editor is a footnote: the output still has to clear HIPAA or PCI on its own, and "the AI wrote it" is not a phrase an auditor accepts.

When to get a security audit

Hardening Cursor protects your laptop. It does nothing for the app you built with it. These are the moments where a second pair of eyes pays for itself:

  • Before the first real users. Not the first demo. The first stranger with a real email address and real data. Access control bugs are invisible until someone who is not you logs in.
  • Before you take payments or store anything regulated. Stripe webhooks, health records, KYC documents. One misconfigured policy here is a disclosure letter, not a bug ticket.
  • Before due diligence. Investors and acquirers increasingly ask "was this AI-built, and who checked it". Have the answer written down.
  • After a big agent session you did not fully read. You know the one.

We do this for a living. The Week-1 Build Audit is $500 flat, takes one week, covers auth, data security, exposed keys, payments and the Cursor-specific config files above, and the $500 is credited 100% against any build you do with us. If the audit finds more than you want to fix yourself, the Cursor to production service takes the app to a hardened launch; the Go-Live Intensive starts from $14,000. Weighing which tool to use next time? Read Cursor vs Copilot on security, or the sibling guides: is GitHub Copilot safe, is Bolt safe, is v0 safe, is Replit safe. Already built in Cursor and want the concrete fixes? Fix and harden a Cursor app for production.

Want us to look first?

Free 15-minute build audit: you show us the Cursor app, we tell you the specific security and production gaps and what it takes to close them. No obligation. If it looks fine, we will say so.

Book your free build audit

Sources

FAQ

Is Cursor safe to use?

Yes, if you keep it updated, turn on Workspace Trust, use Auto-review run mode with the sandbox on, and enable Privacy Mode. Cursor has published more than a dozen security advisories against itself since 2025 and fixed nearly all of them quickly. The risky part is the default setup and the code you ship without review, not the installer.

What are the main Cursor security risks?

Three patterns: files in a repo that the agent reads and acts on (the Rules File Backdoor, tasks.json autorun, MCP config poisoning), sandbox escapes where something outside the sandbox runs what the agent wrote (Git hooks, Claude hooks, Python venvs, Docker), and the code it generates, which Veracode found introduces an OWASP Top 10 issue in 45% of benchmark cases.

Has Cursor had CVEs?

Yes. Verified ones include CVE-2025-54135 (CurXecute, fixed 1.3.9), CVE-2025-54136 (MCPoison, fixed 1.3), CVE-2025-59944 (fixed 1.7), CVE-2025-64106 and CVE-2025-64110 (fixed 2.0), CVE-2026-22708 (fixed 2.3), CVE-2026-26268 (fixed 2.5), CVE-2026-48124, CVE-2026-50548 and CVE-2026-50549 (fixed 3.0), and CVE-2026-73217 (fixed 3.1.2). All are published on Cursor's GitHub advisory page.

How do I secure Cursor?

Update to the latest version, add "security.workspace.trust.enabled": true and "task.allowAutomaticTasks": "off" to user settings.json, set run mode to Auto-review (never Run Everything), keep the sandbox network mode on its default, turn on Privacy Mode, write a .cursorignore for secrets, approve MCP servers one by one after reading the command, and review rules files, tasks.json, mcp.json and .claude settings files in every PR.

Is Cursor safe for proprietary code?

With Privacy Mode on, Cursor says your code is never used for training by Cursor or its model providers and that it holds zero-data-retention agreements with them. It is on by default for Teams and Enterprise and admins can enforce it. Two exceptions: ZDR does not apply if you use your own API key, and some models require provider retention and are off by default until an admin approves them.

Is Cursor SOC 2 compliant?

Cursor states on its security page that it holds a SOC 2 Type II attestation along with ISO/IEC 27001:2022, ISO/IEC 42001:2023 and AIUC-1, with reports available on request through trust.cursor.com. Verify at contract time; the page, not a guide, is what your security review should cite.

What is Cursor YOLO mode and is it safe?

YOLO mode was the old name for letting the agent run commands without asking. Today it is the Run Everything run mode. Cursor's docs describe it as for users who accept the risk and want zero prompts, and say run modes are best-effort guardrails, not a hard security boundary. Use Auto-review instead. Run Everything turns every prompt injection in the table above into a working exploit.

Is the code Cursor writes secure?

Not by default. Cursor uses the same models as other assistants, and Veracode's 2025 benchmark found them introducing OWASP Top 10 vulnerabilities in 45% of test cases, with cross-site scripting failing 86% of the time. Expect broken access control, exposed keys and injection until a human reviews auth, secrets and data access before launch.

If something you built with AI is about to meet real users, get a second pair of eyes on it first. Send us the URL and we will tell you what we would check before launch and whether anything on it worries us. No charge and no call needed, and if it looks fine we will just say so.