Is Cursor safe? Yes for most codebases, once three things are set: Privacy Mode on, an agent run mode that still reviews shell commands, and secrets kept out of the folder the agent opens. Those settings govern the editor and its agent. Whether the app it helped build keeps each user to their own records takes a separate test.
Is Cursor safe? The verdict, and the three questions behind it
Cursor is safe for most codebases when Privacy Mode is on, the agent runs in Auto-review or Allowlist mode rather than Run Everything, and secrets stay out of the workspace. Cursor’s platform carries a SOC 2 Type II attestation and ISO/IEC 27001 and 42001 certifications; the app its agents write carries no such assurance and needs its own tests.
Whether Cursor AI is safe to use on your repository splits into three questions. The first is Cursor’s platform: the controls it documents and has assessed. The second is its agents: what they can read, run, call and reach under the permissions you choose. The third is the app those agents write, which stays your responsibility whatever the editor does. We read Cursor’s security page, its data-use page and its agent docs on October 20, 2026 for this review; we did not run a hands-on test.
| Surface | What Cursor documents | What you still decide |
|---|---|---|
| Cursor’s platform | AIUC-1, ISO/IEC 27001:2022 and ISO/IEC 42001:2023 certifications, a SOC 2 Type II attestation, and at-least-annual third-party penetration testing; reports on request | Whether the report’s scope meets your own vendor rules |
| Prompts and code | With Privacy Mode on, Customer Data is not used for training and model providers work under zero data retention agreements, subject to abuse-review exceptions | Which models are allowed, and what should never enter a prompt |
| Local agent actions | Run modes decide which shell, MCP and Fetch calls run without asking; supported shell commands can run in a sandbox | Which mode, which allowlist entries, which MCP tools |
| Cloud agents | Each agent runs in its own isolated virtual machine and auto-runs terminal commands; internet access is on by default | Which repositories, secrets and domains a remote agent gets |
| The generated app | Security Review reads pull requests for exploitable bugs on the Teams and Enterprise plans | Whether authorization, secrets and recovery hold in the deployed app |
If the worry is whether Cursor is safe to download, take the installer from the download page on cursor.com; Cursor’s pricing page says it does not authorize any resellers or third-party sellers. The same three questions apply to any coding agent that runs commands, and they get the same treatment in whether Claude Code is safe too.
Can Cursor steal my code? What leaves your machine, and what Privacy Mode changes
Cursor does not train on your code while Privacy Mode is on, and it holds zero data retention agreements with all of its model providers. Every AI request still passes through Cursor’s backend, even with your own API key, and the files the agent opens or you attach can travel with that request.
What Cursor may keep and use is set by its published data-use policy and by the setting you choose, so the useful form of the question is where your code goes. Four paths cover it, each in Cursor’s own documentation as of October 20, 2026:
- Every AI request goes through Cursor’s servers. Cursor’s data use overview says requests “will still go through our backend” even when you use your own API key, because that is where the final prompt is built.
- File contents are cached on Cursor’s servers for a short time. The cache is encrypted with client-generated keys that exist on the servers only for the length of a request, and cached files are never stored permanently. Code search does not upload your code to build an index: Cursor’s search docs say Instant Grep builds its index on your machine and Cursor does not store embeddings of your codebase for search.
- Whatever the agent opens or you attach can become part of the request. Cursor sends prompts and code context to model providers such as OpenAI, Anthropic and Google, and a file the agent opens from a code-search result can be included.
- An ignore file narrows the path, with gaps.
.cursorignoreblocks files from Agent, Tab, Inline Edit and @ mentions, but Cursor’s ignore-file docs say the terminal and MCP server tools the agent uses “cannot block access to code governed by.cursorignore”.
With Privacy Mode on, Cursor says Customer Data “will not be used for training by Cursor” and that model providers “will not store or train on your data”. Two exceptions apply: providers may run risk classifiers, and prompts that trigger abuse detectors may be stored for investigation; models without zero data retention terms are labeled or need an administrator to opt in. With Privacy Mode off, Cursor “may use and store codebase data, prompts, editor actions, code snippets, and other code data” to improve its features and train its models.
How private Cursor is depends on that setting more than on the plan. Privacy Mode is available to anyone, free or Pro, and new team members inherit the team’s setting. It is on by default for Enterprise teams, and a team administrator can enforce it so members can’t switch it off.
Cursor’s settings do not secure the app it builds
Cursor’s controls protect the editor and the machine it runs on. Privacy Mode, run modes and the sandbox decide what the agent can touch; none of them checks whether the deployed app enforces authorization, keeps secrets on the server or refuses a second user’s request for someone else’s record. Only a test of the running app shows that.
One of the 21 third-party apps we audited in June and July 2026, a set we selected rather than sampled, was a health-data product sold as “AI guardrails”: it had a 462-line safety-policy YAML file, exactly what a buyer or auditor would point to as the guardrail, yet nothing loaded it at runtime, and the real enforcement was written separately and had already drifted from it.
A policy file, a rules file and an ignore file all exist on disk, and only the running app shows whether any of them is enforced. Cursor’s ignore-file docs say as much about Cursor’s own feature: “While Cursor blocks ignored files, complete protection isn’t guaranteed due to LLM unpredictability.”
In that set of 21 third-party apps, 7 had confirmed cross-user or cross-tenant authorization failures, where a logged-in user could read or write another customer’s data. Those apps are a selected set, not a random sample, and they were built with several tools; our records do not tie each failure to one editor, so the number says nothing about Cursor in particular.
The check that settles it needs two accounts: sign in as the second user, request a record that belongs to the first by its ID, and confirm the app refuses. A two-account test for every route sets out how to run it across an app.
If the app is about to take paying customers and nobody has run that test yet, that is the moment to bring in help: a free audit is where we talk through with you which routes and records to test first. In the full sprint, our engineers work through 123 deliverables across 13 engineering areas.
Cursor security settings: run modes, protections and permissions.json
Cursor security is set in one menu, Settings > Agents > Approvals & Execution, where you choose the run mode. Auto-review is the mode Cursor’s docs call the safest useful setup for most people, Run Everything runs every tool call automatically, and permissions.json adds plain-English allow and block instructions that steer the Auto-review classifier, which can still misjudge a call.
The table lists the settings that decide Cursor IDE security on your own machine, each named as Cursor’s run-mode docs print it on October 20, 2026.
| Setting | Safer choice | What it does not cover |
|---|---|---|
| Auto-review run mode | The default for most work: allowlisted calls run, other shell commands run in the sandbox when possible, and the rest go to a classifier | The docs say Auto-review “is not a security boundary”: the classifier can allow a call you would have blocked |
| Allowlist run mode | A small set of trusted repeat actions; everything else asks first | An entry written too broadly; Cursor calls the allowlist “best-effort, not a security boundary” |
| Run Everything run mode | Avoid on any real repository: every tool call runs automatically, with no sandbox and no classifier | Everything |
| File-Deletion Protection | Leave on: the agent cannot delete files automatically, including rm commands | Changes that are not deletions |
| External-File Protection | Leave on: the agent cannot create, modify or delete files outside the workspace automatically | Files inside the workspace |
| Browser Protection | Leave on: the agent cannot run Browser tools automatically | Fetch and MCP calls, which follow the run mode |
| Read access | Workspace: reads outside the workspace ask first (Cursor 3.23 or later; the default is System) | Run Everything mode, where it does not apply |
| MCP tools and Fetch calls | Approve each MCP connection and keep the MCP allowlist short; in Auto-review, allowlisted MCP and Fetch calls run immediately | Run Everything, which runs them with no prompt |
permissions.json | Block instructions for anything touching production, billing or cloud credentials (next section) | Guidance to the classifier, not a hard rule |
| Privacy Mode | On, enforced by a team administrator | Where requests go (the privacy section above) |
| Workspace Trust | Enable it (below) | Safe AI use on an untrusted repository: Restricted Mode breaks AI features |
Cursor AI security settings changed names during 2026. The run-mode docs record that Ask Every Time was deprecated in version 3.5 on May 22, 2026, with Allowlist and an empty allowlist as the replacement, and that Auto-review shipped as the recommended default in 3.6 a week later. A denylist and a “Dotfile Protection” toggle appear nowhere on that page today. Rules files sit outside this table because they steer the model and bind nothing; what Cursor rules can and cannot do covers them.
permissions.json: allow_instructions and block_instructions
In Auto-review, the Cursor agent’s calls are weighed against two lists in a permissions.json file, allow_instructions and block_instructions, both under an autoRun key. The file can sit at ~/.cursor/permissions.json for every project on your machine or at <project-dir>/.cursor/permissions.json for one project, which you commit when the team should share it. Entries in allow_instructions describe actions Auto-review should lean toward allowing; entries in block_instructions describe actions it should lean toward blocking, so the agent picks another path or asks you.
Each instruction is a plain-English sentence that guides the classifier. If both files exist Cursor merges them, and a team configuration set in the dashboard takes priority over both. The docs’ own tip is to ask the agent to write the file for you, which also means the agent can edit it.
Our illustration, with the keys exactly as Cursor’s docs print them:
{
"autoRun": {
"allow_instructions": [
"Read-only git commands such as git status, git diff and git log can run."
],
"block_instructions": [
"Any command that touches a production database should go through approval first.",
"Any command that touches billing or cloud credentials should go through approval first."
]
}
}
A rule that must hold every time also belongs in a CI check that fails the build, because a classifier can still misjudge a call; that layer is covered in the guardrails that actually bind.
Workspace Trust, and repositories you did not write
Cursor’s agent security docs say Cursor supports Workspace Trust but ships it disabled by default; in VS Code, the same security.workspace.trust.enabled setting defaults to on. In VS Code, Restricted Mode is what disables or limits tasks, the terminal and extensions in an unfamiliar folder, and a task in a repository’s .vscode/tasks.json marked "runOn": "folderOpen" is one that runs when the folder opens.
To turn it on, add "security.workspace.trust.enabled": true to your user settings.json; organizations can enforce it through MDM. Cursor’s docs add that Restricted Mode breaks AI features and suggest a basic text editor for repositories you do not trust. Until you have read them, treat a cloned repository’s tasks, Git hooks, rules files, extensions and MCP configuration as untrusted.
Cloud agents: a separate decision
A cloud agent runs in a virtual machine in Cursor’s cloud, one isolated machine per agent, with a clone of the repository, its dependencies, the secrets you configure and network access. Run modes do not apply there: Cursor’s cloud-agent security page says cloud agents auto-run terminal commands so they can iterate without stopping for approval, and that a planted instruction “could try to make the agent exfiltrate code to an external host”.
Before you turn one on, answer five questions:
- 01 Which repositories can the Cursor GitHub or GitLab app reach, and can it push to them?
- 02 Do branch protection and required reviews still apply to the draft pull requests the agent opens?
- 03 Which secrets does the agent's environment receive, and are they marked as Runtime Secrets?
- 04 Which domains can the agent reach, or is outbound traffic restricted to an allowlist?
- 05 Would a narrower repository or a short-lived credential do the same job?
Cursor’s main control for the exfiltration risk is network egress: outbound traffic can be restricted to a default set plus your allowlist, or to your allowlist only, “so a compromised agent has nowhere to send data”. Internet access is on by default. A cloud agent can reach only the repositories the person who started it could already reach, and secrets marked as Runtime Secrets are stripped from the transcript, tool output and commits. Cursor’s hooks docs add that cloud agents run the command hooks in a repository’s .cursor/hooks.json, so that file belongs in the review too. Privacy Mode governs how your data is used, not the authority a remote agent holds, and the cloud-agent page notes that Legacy Privacy Mode is not supported for cloud agents at all.
Is Cursor a security risk? Six risks the settings do not remove
Cursor’s security risk grows with the authority its agent holds. Six risks survive every setting: prompt injection through content the agent reads, commands it runs, MCP servers approved once, secrets it reads or prints, packages it installs, and sensitive data sent into model context.
The table is our synthesis; each mechanism is worded as Cursor’s docs or its published advisories describe it. Cursor’s own enterprise guidance says LLMs “can be influenced by carefully crafted prompts (prompt injection)”, and every row below starts from that.
| Risk | How it happens | The control that narrows it | The check |
|---|---|---|---|
| Prompt injection through untrusted content | A web page, issue, file or tool result carries instructions the agent follows; one 2026 advisory chained this with an allowlist bypass | Fewer tools, the sandbox’s blocked-by-default network, approval for anything outside the workspace | Read the run mode and allowlist after every change |
| Commands the agent runs | In Run Everything, every tool call runs automatically | Auto-review or Allowlist, with File-Deletion and External-File Protection on | The mode shown in Approvals & Execution |
| MCP servers and extensions approved once | An approval covers one configuration at one moment; a later edit can change what runs | Re-read every MCP entry when the file changes; keep the MCP allowlist short | The diff of .cursor/mcp.json in each pull request |
| Secrets read or printed | A key sits in the workspace, a command prints it, or an MCP server holds a token | Secrets outside the folder the agent opens; rotation after exposure | The section below |
| Packages an agent installs | On npm 11 and earlier, npm install runs a package’s preinstall, install and postinstall scripts; npm 12 skips a dependency’s install scripts unless allowScripts in package.json approves it | Keep installs off the allowlist and add a block instruction for them, although Cursor’s own allowlist examples include npm install | Confirm the exact package name and version before you approve |
| Sensitive data entering model context | Anything the agent opens or you attach goes into the request; Privacy Mode changes what happens afterwards, not whether it is sent | Model blocklists, and hooks that scan a prompt before it is sent | The allowed-models list for the team |
Most of these Cursor AI risks come from the agent acting on text it was given. The rows on MCP and packages have their own history: packages are covered in what the npm malware incidents did, and the MCP record is in the vulnerability section below.
Secrets an agent has read: rotate them, and check git history
Secrets leave an agent session three ways: read into context because the file sat in the workspace, printed by a command into a transcript, or used by an MCP server or cloud environment you handed a token. Keep .env files, cloud credentials and customer exports outside the folder the agent opens, and rotate any key an agent has read. In the same audits, 6 of the 21 third-party apps shipped a real secret.
A key deleted from the latest commit is still in the repository’s history, so the fix is to scan the history and rotate the key, then confirm the old one no longer works. The wider set of controls for keys sits in secrets management for an AI-built app.
Cursor’s vulnerability record: what the CVEs show
Cursor’s published security advisories on GitHub list nine advisories published in 2026 as of October 20, 2026.
| Advisory | Affected behavior | Fixed version | Published |
|---|---|---|---|
| CVE-2026-22708 | In the non-default Auto-Run plus Allowlist mode, shell built-ins could change environment variables and bypass the command allowlist | 2.3 | 2026-01-14 |
| CVE-2026-26268 | A prompt-injected agent could write .git settings, including Git hooks, and get code run outside the sandbox when Git triggered them | 2.5 | 2026-02-13 |
| CVE-2026-31854 | Prompt injection from a visited website plus an allowlist bypass could run commands even with “Use AllowList” set | 2.0 | 2026-03-09 |
| CVE-2026-48124 | Workspace-defined Claude hook commands in .claude/settings.local.json could run without dedicated approval | 3.0.0 | 2026-05-21 |
| CVE-2026-50548 | An agent-controlled working directory let the sandbox write outside the workspace, leading to non-sandboxed code execution (Critical) | 3.0 | 2026-06-05 |
| CVE-2026-50549 | A symlink plus a failed path check let the agent write outside the workspace without approval (Critical) | 3.0 | 2026-06-05 |
| CVE-2026-61613 | In browser-enabled cloud agent sessions, web content could run code inside the agent’s sandbox, where GitHub App tokens were available | Fixed on 2026-03-31 (the advisory gives a date, not a version) | 2026-07-06 |
| CVE-2026-73217 | On macOS, a sandboxed agent could replace a virtual environment’s Python with a wrapper that later ran outside the sandbox | 3.1.2 | 2026-07-14 |
| CVE-2026-73218 | On macOS with Docker Desktop and the Dev Containers CLI installed, a sandboxed agent could launch a privileged container and escape | None listed in the advisory | 2026-07-14 |
The fixed versions are historical minimums for those specific issues, and one 2026 advisory lists no patched version at all, so the advice is to stay on the current release and read new advisories as they appear rather than to be above any one version.
The clearest example is from 2025. The NVD record for CVE-2025-54136, published August 2, 2025, describes versions 1.2.4 and below: an attacker with write access to a shared repository could modify an MCP configuration the user had already approved, and Cursor’s own advisory puts it this way: “Once a collaborator accepts a harmless MCP, the attacker can silently swap it for a malicious command (e.g., calc.exe) without triggering any warning or re-prompt.” Version 1.3 fixed it: Cursor “now requires user approval every time an mcpServer entry is modified”. Two neighbors hit the same file: CVE-2025-54135 let an injected prompt create .cursor/mcp.json without approval when it did not yet exist (fixed in 1.3.9), and CVE-2025-59944 got past the file’s protection on case-insensitive filesystems because the checks were case-sensitive (fixed in 1.7).
As we read the record, each of those three turned on whether Cursor trusted a configuration file by its name or by its content, and a tool that trusts the name turns one approval into standing permission. A patched advisory records an issue that was found and fixed; counting advisories gives no security score.
Cursor Security Review: what Cursor’s security agents check
Cursor Security Review is a Cursor-managed agent that reads every pull request in the context of the codebase and posts one review comment reporting exploitable bugs, on the Teams and Enterprise plans, per Cursor’s changelog of September 23, 2026. It reviews code changes as they arrive, and a person still decides which findings to fix.
Cursor’s changelog says the review looks for injection across SQL, command and template surfaces, authentication and authorization bypasses, including checks a refactor stopped running, secrets committed to source, SSRF and unvalidated redirects, unsafe deserialization, and dependency changes that bring in known vulnerabilities. Each finding carries a severity, the attack path and a proposed fix.
Cursor’s Security Review docs describe two Cursor security agents: Security Reviewer, which checks pull requests before they merge on Git triggers, and Vulnerability Scanner, which scans the codebase at rest on a cron schedule. A team can switch built-in checks on or off, add custom instructions, and connect tools or MCP servers so findings go to Slack or an issue tracker; a Security Reviewer cannot be saved without at least one tool or MCP. Both run on Cloud Agents, except that a team’s pull-request review runs on Cursor-managed hosting.
What it is not, in our reading: it reads code, so it cannot show how the deployed app answers when a second signed-in user asks for the first user’s record, and it does not decide whether a finding matters to your product.
What Cursor’s security page claims: SOC 2, the trust center and subprocessors
These are Cursor’s claims about its own systems, from its security page last updated August 25, 2026, and they read as claims.
- AIUC-1, ISO/IEC 27001:2022 and ISO/IEC 42001:2023 certifications plus a SOC 2 Type II attestation, with certificates and reports available on request at trust.cursor.com.
- Penetration testing by reputable third parties at least once a year, with an executive summary of the latest report on request.
- A published subprocessor list, each subprocessor evaluated under a vendor risk management program and re-reviewed annually.
- Model blocklists respected: Cursor will not send requests to a model on a blocklist.
- A list of Cursor backend domains to allowlist for teams behind a corporate proxy.
- Account deletion at any time from the Settings dashboard.
- Vulnerability reports acknowledged within 5 business days, with critical incidents communicated by email to affected users.
For Cursor SOC 2 compliance evidence, the report itself is the document to read, and Cursor’s trust portal is where Cursor’s trust center takes requests for it. None of these claims covers the extensions and MCP servers you install, the repositories you point agents at, the commands you allowlist, or the app the agent writes.
Cursor for a side project, a team with customer data, or regulated work
The right settings depend on what the repository holds. Each answer below points back to the settings table above.
On a side project
Turn Privacy Mode on, use Auto-review, the recommended default since Cursor 3.6, and keep .env files out of the folder you open. Then spend the remaining attention on the app itself: server-side authorization is where a side project’s real risk sits, as the section on the app above sets out.
On a team that holds customer data
Have an administrator enforce Privacy Mode and the allowed models, so the setting does not depend on who joined last. Rule out Run Everything on any repository with production credentials, keep customer exports outside every workspace, and treat each MCP server as software you are installing. Whether Cursor is safe to use for work at your company is your employer’s policy; these are the settings to show whoever writes it. The baseline a team needs before its first customers is set out in the baseline a security review checks.
On regulated or enterprise work
Request the SOC 2 Type II report and the penetration-test summary through the trust portal, check the subprocessor list against your vendor rules, confirm model blocklists, and enforce privacy and run modes centrally. Whether Cursor is HIPAA compliant for your team depends on a signed agreement: Cursor’s docs say it supports HIPAA Business Associate Agreements for Enterprise customers, that a signed BAA is required before submitting protected health information, and that “A BAA does not automatically make every product, configuration, or workflow appropriate for PHI.” Requests still route through Cursor’s backend whatever the settings, as the privacy section shows. This is not legal advice.
How to secure Cursor: the setup in eight steps
Securing Cursor takes eight settings and habits: a current release, Privacy Mode enforced, secrets outside the workspace, Auto-review or Allowlist instead of Run Everything, Workspace Trust on, narrow allowlists and MCP tools, installs kept off auto-run, and a separate test of the app with two accounts. Each step has a check you can see.
- 01 Update the Cursor app and CLI to the current release, then read any advisory published since your last update.
- 02 Confirm Privacy Mode and the allowed models on the account you actually use; on a team, check the dashboard shows it enforced.
- 03 Move .env files, cloud credentials and customer exports out of the folder you open, and check the folder listing.
- 04 Choose Auto-review or Allowlist under Settings > Agents > Approvals & Execution, never Run Everything on a real repository.
- 05 Enable Workspace Trust in your user settings.json, and confirm a new folder opens with the trust prompt.
- 06 Keep the command allowlist and MCP tools narrow, and re-read them whenever .cursor/mcp.json or permissions.json changes in a pull request.
- 07 Keep install commands off the allowlist and add a block instruction for them in permissions.json, then check that the next install asks for approval.
- 08 Test the app with two accounts: request one user's record while signed in as the other, and confirm the app refuses.
A .cursorignore file uses .gitignore patterns. Ours, as an illustration built from the patterns Cursor’s docs suggest:
# .cursorignore (our illustration)
**/.env
**/.env.*
**/credentials.json
**/secrets.json
**/*.key
**/*.pem
It keeps those files away from Agent, Tab, Inline Edit and @ mentions, not from the terminal or MCP tools, so it narrows exposure without making a secrets boundary; the privacy section above has the detail.
In the sprint, deliverable 10.8, AI repository guardrails, is verified this way: we review the guidance and demonstrate CI catching a representative forbidden regression. Deliverable 2.2, repository history scan and rotation, is verified by retaining scan results and confirming exposed credentials have been invalidated and replacements work.
Common questions about Cursor’s safety
Is Cursor a legit company?
Yes. Cursor is made by Anysphere, Inc., the company named on every page of cursor.com, and Cursor’s own announcement of August 14, 2026 says it has been acquired by SpaceX. Cursor’s security page lists a SOC 2 Type II attestation and ISO/IEC 27001 and 42001 certifications, with reports available on request through its trust portal.
Is Cursor a Chinese company?
No. Cursor is made by Anysphere, Inc., and Cursor’s announcement of August 14, 2026 says Cursor is now part of SpaceX. Cursor’s security page also states that Cursor “does not use or maintain any infrastructure in China” and does not use companies headquartered in China as subprocessors, a claim about its own systems.
Is Cursor owned by Elon Musk?
Cursor’s owner is SpaceX, the company: Cursor’s announcement of August 14, 2026 says Cursor “has officially been acquired by SpaceX”, completing a process that began in April with a partnership with SpaceXAI. The announcement does not mention Elon Musk.
When should you get outside help with an app built in Cursor?
Get outside help when the app is about to take real customers or their data and nobody has yet tested its authorization, its secrets and its recovery outside the editor. AxonBuild goes over those risks with you in a free audit, so you know which one to settle first.
Worried about the app Cursor helped you ship?
Cursor's privacy and agent settings protect your machine, but they say nothing about whether one customer can reach another's data in the app you deploy. Bring it to an audit: we go over the app with you and your team and rank the risks we can see. You come away knowing what to settle first.
Book a free audit →
Free · 30 minutes · No code access needed