AI coding agent admin guide·verified October 21, 2026

is cursor safe for company code

What Cursor does with your code under Privacy Mode, what its agent can do by default, the security advisories it has fixed, and the admin controls to turn on.

the short answer

It can be, with the right settings. With Privacy Mode on, Cursor says customer data is not used for training and it holds zero data retention agreements with its model providers. The bigger risk is the local agent: since Cursor 3.6 the default Auto-review mode lets an LLM classifier approve commands, Cursor calls run modes best-effort guardrails, Workspace Trust is off by default, and it has fixed many agent advisories since 2025. Enforce Privacy Mode and Workspace Trust, restrict run modes, gate actions with hooks.

Training
Not with Privacy Mode on; may be used and stored with it off
Privacy Mode
Enforceable per team; on by default for Enterprise teams
Default run mode
Auto-review since Cursor 3.6: allowlist, sandbox and LLM classifier
Workspace Trust
Off by default; enforceable with the WorkspaceTrustEnabled MDM policy
Certifications
SOC 2 Type II, ISO/IEC 27001:2022, ISO/IEC 42001:2023, AIUC-1

What Happens to Your Code

Admins can enforce Privacy Mode for every member of a team and use the AllowedTeamId MDM policy to block personal-account sign-in on company devices. Data residency is set per Enterprise team: US-only for certain models, with a 10% model-price uplift, and inference-only for EU/UK on request; SSO, BYOK and MCP servers are not covered. See personal AI accounts.

QuestionPrivacy Mode onPrivacy Mode off
Used for training?No: “Customer Data will not be used for training by Cursor”Cursor may use and store codebase data, prompts, editor actions and code snippets
Model provider retentionZero data retention agreements with providers; flagged prompts may be stored for investigation; some models need admin approval because the provider retains dataProvider terms apply
Where requests goThrough Cursor’s backend to model providers, even with your own API keySame
Code stored by CursorDurable storage only for Cloud Agents: the repository copy is deleted after the run, but environment snapshots are kept up to 30 days of inactivity and Cloud Agent conversation history indefinitely by default; file contents are cached temporarily, encryptedCursor may store and train on codebase data, prompts, editor actions and snippets

What the Local Agent Can Do by Default

AreaDefault (as of October 2026)
Terminal commandsSince Cursor 3.6 the default run mode is Auto-review: allowlisted calls run, other shell commands run in a sandbox, and the rest go to an LLM classifier; only calls it blocks ask the user
Reads outside the workspaceAllowed without approval by default (Read Access: System, Cursor 3.23+); the Workspace setting makes them ask first
File edits in the workspaceNo approval; saved to disk immediately
Configuration filesEdits need approval
MCPConnections and tool calls need approval unless allowlisted
NetworkSandboxed shell commands get the “sandbox.json + Defaults” allowlist (package-manager domains); commands the classifier approves run outside the sandbox
Workspace TrustDisabled, so a malicious repository’s .vscode/tasks.json autorun task can run on folder open (Oasis Security, 2025; no CVE)
Run modesAuto-review (default), Allowlist, Run Everything; Cursor: “Auto-review is not a security boundary”

Agent-Related Advisories Cursor Has Fixed

The pattern across these: allowlists and sandboxes get bypassed, and agent-writable config files become code execution. Keep Cursor updated, and do not treat an allowlist as the only line. The full list is on Cursor’s GitHub advisories page.

IDPublishedImpactFixed in
CVE-2025-54135 “CurXecute”Aug 2025Prompt injection creates .cursor/mcp.json without confirmation → RCE1.3.9
CVE-2025-54136 “MCPoison”Aug 2025An approved MCP config edited silently with no re-approval → persistent RCE1.3
CVE-2025-54131Aug 2025Allowlist bypass → arbitrary command1.3
CVE-2025-59944Oct 2025Case-sensitivity check lets the agent overwrite .cursor/mcp.json → RCE1.7
CVE-2026-22708Jan 2026Terminal allowlist bypass via environment variables2.3
CVE-2026-26268Feb 2026Sandbox escape via Git hooks2.5
CVE-2026-50548Jun 2026Sandbox escape via agent-controlled working directory (critical)3.0
CVE-2026-73218Jul 2026Sandbox escape via privileged containers (macOS with Docker Desktop and the Dev Containers CLI)Affected below 3.0.0; the advisory lists no patched version

Admin Controls to Turn On

Workspace Trust is off by default; enforce it with the WorkspaceTrustEnabled MDM policy. For one policy that also covers Claude Code, Codex and Copilot CLI, see one policy across agents.

ControlPlanWhat it does
Enforce Privacy ModeTeams and Enterprise (on by default for Enterprise)No training on team data; ZDR with providers
WorkspaceTrustEnabled via MDMAny managed deviceTurns Workspace Trust on so untrusted folders do not auto-run tasks
AllowedTeamId via MDMEnterpriseBlocks personal accounts on company devices
Restrict run modes and sandbox networkTeam settingsTeam settings override local permissions.json
MCP allowlistEnterpriseAllow servers by command or URL
Enterprise hooks.json with failClosed: trueSystem paths on each machineGate shell and MCP calls; fail closed on hook errors
Audit logs, SIEM streaming, OTelEnterpriseAdmin-event record and usage telemetry

FAQ

Does bringing my own API key keep code away from Cursor?

No. Cursor’s data-use page says requests still go through Cursor’s backend when you use your own key.

Is Cursor SOC 2 certified?

Cursor lists SOC 2 Type II, ISO/IEC 27001:2022, ISO/IEC 42001:2023 and AIUC-1, with reports in its trust center. That covers Cursor’s service, not your controls over the agent.

Is the command allowlist enough to stop dangerous commands?

No. Cursor calls run modes best-effort guardrails, and several advisories were allowlist bypasses. Deny dangerous actions in a hook that fails closed.

Sources

Checked against the sources below on October 21, 2026. Harness settings, hook capabilities and cloud features change between versions.

  1. Cursor: Data use
  2. Cursor docs: Privacy and data governance
  3. Cursor: Security
  4. Cursor docs: Agent security
  5. Cursor docs: Run modes
  6. Cursor docs: Enterprise deployment patterns (MDM policies)
  7. Cursor docs: Cloud agent security and network
  8. GitHub: cursor/cursor security advisories
  9. Check Point Research: MCPoison (CVE-2025-54136)
  10. Oasis Security: Cursor Workspace Trust disabled by default