Cursor
Security FAQ

What are common security mistakes in Cursor apps?

Get instant answers about your app's security.

Short Answer

The mistakes we see repeatedly in Cursor apps: prompt injection in mcp servers; workspace trust exploitation; code suggestion security flaws. Each one is a specific failure mode of Cursor's workflow — not generic programming mistakes.

Detailed Answer

The mistakes we actually see in Cursor apps

These aren't hypothetical — they're what VAS finds when it scans a Cursor app for the first time. Listed in order of how often they appear:

1. Prompt Injection in MCP Servers

*Why it happens:* Malicious content in MCP tool responses can execute arbitrary commands. *What it's cost teams:* CVE-2025-54135 (CurXecute): Slack messages could trigger remote code execution.

*Fix:* Review MCP server sources. Avoid untrusted MCP integrations. Watch for suspicious tool calls.

2. Workspace Trust Exploitation

*Why it happens:* Malicious .cursor/rules files execute when opening untrusted projects. *What it's cost teams:* The 'Rules File Backdoor' vulnerability affects both Cursor and Copilot.

*Fix:* Enable Workspace Trust in settings. Review .cursor/ files before opening projects.

3. Code Suggestion Security Flaws

*Why it happens:* AI suggests vulnerable patterns: SQL injection, hardcoded secrets, weak auth. *What it's cost teams:* Research shows ~40% of AI code suggestions contain security issues.

*Fix:* Review all AI suggestions critically. Run security scans on generated code.

4. Privacy and Code Exfiltration

*Why it happens:* Code sent to AI servers may expose proprietary logic or secrets.

*Fix:* Enable Privacy Mode. Use .cursorignore for sensitive files.

5. Supply Chain via Package Hallucination

*Why it happens:* AI suggests non-existent packages that attackers could register. *What it's cost teams:* LLMs hallucinate npm package names that attackers then create with malware.

*Fix:* Verify all package suggestions exist. Check package reputation before installing.

Why these specifically show up in Cursor (and not as much elsewhere)

Cursor's workflow optimizes for speed — idea to deployed app in minutes. The mistakes above aren't character flaws, they're the predictable output of a speed-optimized workflow that doesn't enforce security gates. The fix is treating security gates as non-negotiable, not as "I'll get to it later."

Security Research & Statistics

10.3%

of Lovable applications (170 out of 1,645) had exposed user data in the CVE-2025-48757 incident

Source: CVE-2025-48757 security advisory

4.45 million USD

average cost of a data breach in 2023

Source: IBM Cost of a Data Breach Report 2023

500,000+

developers using vibe coding platforms like Lovable, Bolt, and Replit

Source: Combined platform statistics 2024-2025

Expert Perspectives

There's a new kind of coding I call 'vibe coding', where you fully give in to the vibes, embrace exponentials, and forget that the code even exists.

Andrej KarpathyFormer Tesla AI Director, OpenAI Co-founder

It's not really coding - I just see stuff, say stuff, run stuff, and copy paste stuff, and it mostly works.

Andrej KarpathyFormer Tesla AI Director, OpenAI Co-founder

Check Your Cursor App's Security

VAS scans for all the security issues mentioned above. Get a comprehensive security report in minutes.

Get Starter Scan

More Questions About This Topic

How common are these mistakes in Cursor apps — is this overstated?

Understated, if anything. The majority of Cursor apps scanned for the first time have at least one of the high-likelihood mistakes above. "Prompt Injection in MCP Servers" in particular is the default state of a new Cursor app before any security work. Our sample skews toward apps whose owners care enough to scan — the base rate for never-scanned Cursor apps is higher.

What are the actual consequences when these mistakes ship to production?

The consequence ladder: (a) data exposure — emails, passwords, PII, payment info readable by anyone; (b) account takeover — if auth is weak, legitimate accounts get hijacked; (c) third-party abuse — an exposed OpenAI or Stripe key gets drained of quota or money; (d) regulatory — GDPR/CCPA notification requirements trigger at ~first exposure; (e) reputational — "Cursor app data breach" is a headline that doesn't age well. Each consequence compounds the next.

How do I avoid these mistakes when building with Cursor?

Three non-negotiable habits: (1) Configure Row Level Security (RLS) policies at table/collection creation — before writing any feature code. (2) Treat any paste-a-key-into-code as a bug from the first keystroke, not "I'll move it to env vars later." (3) Run a VAS scan before every production deploy — five minutes of scanning prevents hours-to-weeks of breach response. Specifically: Review MCP server sources. Avoid untrusted MCP integrations. Watch for suspicious tool calls..