A security review of an app written with Cursor covers three things. The first is the app itself: secrets committed to the repository, API routes that do not check who is calling, and database rules. The second is the packages the AI added, because language models sometimes suggest package names that do not exist and attackers register them. The third is the editor setup, meaning Cursor rules files and MCP servers, which can carry hidden instructions and were the subject of two Cursor vulnerabilities fixed in 2025. A founder can run most of the checks below in an afternoon.
Cursor is an editor, so an app built with it can look like anything: Next.js on Vercel, a Python API, a Supabase front end. That makes the review broader than for Bolt or Replit, where the platform decides much of the stack. This post goes through the checks in the order we would run them.
The short answer
Scan the git history for secrets and rotate anything found. Open every API route and confirm it checks the session and the user's right to the record. Check each dependency exists, is the package you meant, and has real usage. Read your .cursor/rules files and mcp.json as you would code, and keep Cursor updated.
Secrets in the repository
Cursor writes code fast, and when you paste a key into chat to get something working, it often ends up in a file. Once committed, the key stays in git history even after you delete the line.
Check: run a secret scanner such as gitleaks detect or trufflehog git file://. over the whole repository, history included. GitHub’s secret scanning does the same for repositories hosted there. Anything it finds should be rotated at the provider, because removing it from the code does not un-leak it.
Also check the front end. In Next.js, any variable starting with NEXT_PUBLIC_ is sent to the browser, and in Vite the prefix is VITE_. Build the app and search the output for key prefixes like sk_, sk- and re_.
Auth on every API route
A common serious bug in AI-written code is an API route that works but does not check who is calling. The model writes a handler that takes an id from the request and returns the record. Without a check that the signed-in user owns that record, anyone can read anyone’s data by changing the id.
Check: list every route (in Next.js, everything under app/api or pages/api, plus server actions). For each one, find the line that reads the session and the line that checks the user may touch this record. If either is missing, it is a finding. Middleware that blocks logged-out users is useful, but it does not check ownership.
If the app uses Supabase from the browser, row-level security does this job at the database. The test is in Your Lovable app is probably public, and it applies to any Supabase app.
Hallucinated packages and slopsquatting
Language models sometimes suggest installing packages that do not exist. A study presented at USENIX Security 2025 by Spracklen and colleagues tested 16 code models and found that 19.7% of generated samples referenced at least one package that did not exist, with open-source models far more prone to it than commercial ones. Many of those invented names came up again when the same prompt was repeated, which makes them predictable. Registering a package under a name models tend to invent, so that it gets installed by people following AI suggestions, has been called slopsquatting.
The study’s samples were largely generated by asking models what to install, so the figure is a measure of model behaviour rather than a rate you should expect in your own repository. The risk is still worth ten minutes.
Check: go through package.json or requirements.txt. For each dependency you do not recognise, look it up on npm or PyPI: does it have a real repository, a history of releases and meaningful download numbers? A package published recently with almost no downloads and a name close to a popular one deserves a closer look. Run npm audit or pip-audit for known vulnerabilities, and commit your lockfile so installs are repeatable.
Rules files and MCP servers
Cursor reads instructions from rules files in the project and can connect to MCP servers that give the AI tools such as database access or Slack. Both are inputs the model acts on, so both can carry prompt injection.
In March 2025, Pillar Security described a “Rules File Backdoor”: hidden Unicode characters in a rules file can carry instructions a person reviewing the file does not see, and in their demonstration the assistant added a script tag to generated HTML. Pillar reported that Cursor’s response was that managing this risk is the user’s responsibility.
Two CVEs followed in mid 2025, both involving MCP configuration:
- CVE-2025-54135 (CurXecute), found by Aim Labs. A prompt injection arriving through an MCP server, for example a message in Slack, could get the agent to write to the MCP configuration file and run commands without the user approving them.
- CVE-2025-54136 (MCPoison), found by Check Point Research. Once a user had approved an MCP server in a shared repository’s config, an attacker could change its command later without a new approval prompt.
Both were fixed in the Cursor 1.3 line released in late July 2025 (Tenable lists 1.3.9 as the fixed version for CVE-2025-54135). Cursor now asks for approval again when an MCP entry changes.
Check: update Cursor and confirm you are on 1.3.9 or later. Read every file in .cursor/rules and any .cursorrules file, and scan them for invisible characters (grep -P '[\x{200B}-\x{200F}\x{202A}-\x{202E}\x{2066}-\x{2069}]' finds the usual ones). Open .cursor/mcp.json and the global MCP config and remove servers you do not use. Treat changes to these files in pull requests as code changes that need review. Be careful about connecting MCP servers that read content strangers can write, such as public Slack channels, issue trackers or inboxes, to an agent that can also run commands.
What else belongs in a full review
Beyond the four areas above, a production review should look at rate limits on sign-up, login and AI endpoints, how errors are logged (and whether logs contain personal data), backups and restore, and whether file uploads are checked for type and size. If the app was started in another tool before moving into Cursor, review the original platform’s setup too: see Is my Bolt.new app secure? and Replit app to production.
Getting it reviewed
Our vibe-coded app audit covers all of the above for Cursor apps, starts at $500, and ends with a written report within a week, ordered by risk. If you want the fixes done, Harden starts at $1,000. Rebuild starts at $8,000 for apps whose structure makes fixing route by route more expensive than starting the server layer again. For Supabase-backed apps, our Supabase integration page shows how we set up the database side.
Questions we get asked
Is Cursor itself safe to use?
Cursor has had vulnerabilities and fixed them, like most editors. Keep it updated, review rules files and MCP config as code, and be selective about which MCP servers you connect. The larger risk for most founders is in the app the editor produced.
I deleted the key from the file. Do I still need to rotate it?
Yes, if it was ever committed or pushed. It remains in git history, and anyone with a copy of the repository can find it.
Does npm audit catch slopsquatting?
Not reliably. npm audit reports known vulnerabilities in published packages. A newly registered malicious package may have no advisory yet. Checking that each dependency is the one you meant is a separate step.
Should I stop using AI-suggested packages?
No. Check the name before you install it, prefer well-known packages, and keep a lockfile. The study found most hallucinated names were not near-misses of real ones, so they are easy to spot once you look.
Sources and further reading
- We Have a Package for You! A comprehensive analysis of package hallucinations by code generating LLMs, Spracklen et al., USENIX Security 2025
- AI hallucinations lead to a new cyber threat: slopsquatting, CSO Online
- New vulnerability in GitHub Copilot and Cursor: how hackers can weaponize code agents, Pillar Security, March 2025
- CVE-2025-54135, CVE-2025-54136: frequently asked questions about vulnerabilities in Cursor IDE, Tenable
- Cursor IDE: persistent code execution via MCP trust bypass, Check Point Research, on MCPoison
- CVE-2025-54136, NIST National Vulnerability Database
- vibe-coded app audit, the SBD service this post describes















