Platform Guides

Is Cursor Safe? Not Entirely, Here's Every Real Cursor Security Risk

January 15, 2026Last Updated: July 22, 20265 min read
Focus
Cursor
Risk
Critical
Stack
Cursor
Detection
Ubserve Runtime Simulation
Dark AI coding terminal with highlighted auth, token, and mutation boundaries.

Is Cursor safe? Not entirely. Three critical CVEs and one recurring code-generation risk explain exactly where Cursor security actually breaks down.

Cursor has shipped three critical, patched CVEs since 2025. Here's what they were, what's still risky in the code it generates, and how to catch both before production.

Secure your vibe-coded app with Ubserve

  • Takes less than 60 seconds
  • 100+ security checks run through your app
  • Plain English explanations for each issue
  • AI fix prompts for every issue
Scan my app free

Is Cursor safe? Not entirely, but not for the reason most people assume. Cursor has shipped three critical, disclosed vulnerabilities since 2025: CurXecute (CVSS 9.8), MCPoison (CVSS 8.8), and a path-traversal flaw (CVE-2025-32018, CVSS 8.0). All three were patched quickly once reported, and Cursor runs a public security program and bug bounty. That's the good part. The part that doesn't go away with an update: Cursor changes the economics of software creation. It does not change the economics of security failure. Even on a fully patched install, the code Cursor generates for your app carries a separate, ongoing risk that no version bump fixes.

This guide covers both layers: the real CVEs Cursor has patched, and the code-generation risk that persists regardless of which version you run.

Cursor's Real, Disclosed Vulnerabilities

CVE Name Severity What it did Fixed in
CVE-2025-54135 CurXecute 9.8 Critical Indirect prompt injection wrote to .cursor/mcp.json without approval, achieving remote code execution 1.3.9
CVE-2025-54136 MCPoison 8.8 High Silently swapped an already-approved MCP config for a malicious command, no re-prompt 1.3
CVE-2025-32018 (unnamed) 8.0 High Agent could be prompted to write files outside the opened workspace 0.48.7

Two of these three target the same file: .cursor/mcp.json. That's not a coincidence, it's the highest-value attack surface in Cursor right now, because it controls which tools your AI agent can invoke. Writing to it is a form of MCP impersonation: once an attacker controls that file, they control what your agent can execute, silently.

How CurXecute chained prompt injection into remote code execution

What this means in practice: if your team is running any Cursor version before 1.3.9, you are exposed to a critical, actively-documented RCE path. Updating is the fix, and it's the single highest-leverage action on this page.

The Risk That Doesn't Go Away With an Update

Here's the part patching doesn't solve: Cursor produces code that works before it produces code that's authorized correctly, and that gap exists on every version, patched or not.

The failure mode in Cursor-assisted apps is rarely bizarre code. It's reasonable-looking code, accepted too quickly. That matters most in exactly the areas our Cursor security checklist tells you to slow down for: authorization, JWT handling, and environment variable boundaries, the parts of an app where "looks right" isn't good enough.

The common Cursor edge case

One pattern we keep seeing: a generated helper that centralizes access to "make auth easy," but accidentally normalizes unsafe trust in client-provided identity.

export async function updateWorkspace(input: {
  workspaceId: string;
  name: string;
}) {
  const session = await getSession();

  if (!session) throw new Error("Unauthorized");

  return db.workspace.update({
    where: { id: input.workspaceId },
    data: { name: input.name },
  });
}

The code checks authentication. It does not check ownership. Any authenticated user can update any workspace by ID, a textbook case of broken access control introduced by well-intentioned automation, not malice.

Authentication check passing while the ownership check is missing

This gets worse across a larger refactor. One prompt touching four files can silently remove the check from three of them while leaving the fourth intact, and every test still passes because the tests never covered the wrong-user case in the first place.

One cascade prompt removing auth checks from three of four files while tests still pass

Review the Places Cursor Helps the Most

The more Cursor accelerates a workflow, the more carefully that workflow needs security review:

  • Route handlers and Next.js Server Actions
  • SQL and Prisma mutations
  • Auth middleware and session validation
  • Vendor SDK setup (Stripe, Supabase, auth providers)
  • File upload flows and storage access
  • .cursor/mcp.json and any MCP tool definitions

These are exactly the areas where a small hallucination, or a single unpatched CVE, becomes a production flaw.

The Entities to Care About

When reviewing Cursor-generated code, don't over-focus on the phrase "AI security." Focus on the actual entities that decide whether access is authorized:

These are the places real access models live or fail, regardless of which Cursor version generated them.

Cursor Security Risks: Complete Pre-Launch Checklist

Critical (Ship Blockers)

  • Cursor is updated past version 1.3.9 (closes CurXecute and MCPoison)
  • .cursor/mcp.json reviewed for tool definitions you did not explicitly add
  • Every mutation has an ownership check, not just an authentication check
  • No secrets pasted into Cursor chat history remain unrotated

High Priority

  • Auth middleware re-verified after every agent-assisted refactor
  • Every generated abstraction tested against an adversarial (wrong-user) case
  • Admin flows isolated from standard user mutation paths
  • Dependency suggestions checked for typosquatting before install

Production Hardening

  • Workspace Trust enabled, untrusted repos never auto-trusted
  • Every secret classified correctly (server-only vs. safe to expose)
  • Every auth claim traced back to a server-verified source, not a client-supplied one

Cursor can absolutely be part of a secure workflow. It just can't be the reviewer of its own assumptions, and as of 2026, it's had three confirmed reasons why.

Cursor is one of many AI builders that ship this class of flaw. For the full picture across every AI-built stack, see our AI code security guide.

Run a free URL scan, no signup required. You only pay if it actually finds something, and if it does, paid plans unlock the full report, exact AI fix prompts, PDF export, and deeper audit coverage.

About the author

Samuel, Founder & maker of Ubserve
Samuel
Founder & maker of Ubserve

I'm Samuel, known online as Mr. Ballaz. I build Ubserve, a security scanner for apps built with AI tools like Cursor, Bolt, Lovable, and Supabase. Before Ubserve, I did manual security audits by hand — checking auth, exposed keys, and RLS policies one by one. Ubserve is that manual audit, automated, running in under 60 seconds instead of days.

Related resources

FAQs

Is Cursor safe?+
Not entirely, but not because Cursor is careless. Cursor has shipped three critical, disclosed vulnerabilities since 2025 (CurXecute, MCPoison, and a path-traversal flaw), all patched quickly once reported. Staying on a current Cursor version closes those specific holes. What it doesn't close is the separate, ongoing risk in the code Cursor generates for your app, that requires review, not a version update.
Is Cursor AI safe to use for production code?+
It can be, with two conditions: keep Cursor updated (versions before 1.3 carry patched but real RCE vulnerabilities), and review every agent-assisted change that touches auth, ownership checks, or secrets before merging. Cursor generates code that runs; it does not verify that the code is authorized correctly.
What is CurXecute (CVE-2025-54135)?+
CurXecute is a critical vulnerability (CVSS 9.8) in Cursor versions below 1.3.9. An indirect prompt injection could trick the agent into writing to .cursor/mcp.json without the file-creation approval Cursor normally requires, achieving remote code execution with no user interaction needed. It was patched in 1.3.9.
What is MCPoison (CVE-2025-54136)?+
MCPoison is a high-severity vulnerability (CVSS 8.8) affecting Cursor 1.2.4 and earlier. An attacker with write access to a shared repository could silently swap an already-approved MCP server configuration for a malicious command, bypassing the re-approval prompt entirely. It was patched in version 1.3.
Is Cursor itself insecure?+
Cursor as a company patches disclosed vulnerabilities quickly and runs a public security program, it isn't careless. But three critical CVEs since 2025 mean the tool itself has had real, exploitable bugs, not just risk from what it generates. Both facts are true at once: keep it updated, and still review what it writes.
What should I review first in a Cursor-assisted codebase?+
Confirm your Cursor version is current (past 1.3.9), then audit .cursor/mcp.json for tool definitions you didn't add, secrets, auth helpers, mutation paths, server actions, and any code that trusts a user-controlled ID or claim without an ownership check. Ubserve's free scan checks the live app for several of these automatically, exposed keys and missing ownership checks included, a fast baseline before you review the code by hand.
Next step

Turn this resource into a real security check.

Review the guidance, then run the free scan to see whether this issue is actually exploitable in your app, no signup required.