Skip to main content
Security guideReviewed

Vibe coding security: check your AI-built app before real users sign up

Apps made with Lovable, Bolt, Replit, Base44, v0 or Cursor can work well and still let one user read another user's data, ship secret keys to every browser or let a payment be skipped.

Here is what goes wrong, a thirty-point check you can run yourself, and what a paid check adds.

Thirty-point pre-launch checklist for AI-built apps

Work through this vibe coding security checklist before real users sign up, ticking each item once you have confirmed it. You need a browser, two test accounts and your platform's dashboard.

How to use it

Items that fail come with a brief you can paste into your builder. Run it only on an app you own.

Why a working AI-built app can still leak data

Vibe coding security is about the gap between an app that works and an app that only does what you meant.

An AI builder writes code until the screens behave the way you asked. Nobody has necessarily asked what happens when someone ignores the screens and talks straight to the database behind them, and that is where most of the trouble in AI-built apps sits.

Many of these apps run on Supabase or Firebase, where the browser talks to the database directly. That design is normal and documented: the project address and a public key travel to every visitor, and rules inside the database decide what each request may read or change.

Supabase's own warning for a table with row level security switched off is that anyone with your project URL can read, edit and delete all of its data.

Firebase's is that, without sign-in and security rules, anyone who guesses your project ID can steal, change or delete it. When those rules are missing or loose, nothing in the screens makes up for it.

The builders are clear about who answers for this. Lovable's documentation says you are responsible for making sure your app meets the security requirements of its use case, and Base44's says you are responsible for your app's security settings. Their scans help, and they are covered below, but the decision to let real people in is yours.

None of this makes AI-generated code security a new science. The flaws are familiar ones, led by the risk OWASP lists first for APIs: one user reaching another user's records by changing an ID in a request. What changes with vibe coding is that the person publishing the app has usually not read the code, and a builder can rewrite a database rule in the middle of an unrelated change. Checking before launch, and again after large changes, is how you learn what was actually built.

Five ways vibe-coded apps go wrong, and what each one costs

These are the vibe coding security risks the checklist on this page is built around.

Each one starts with what could happen to your users or your bill, then says what to look at.

Database rules that let one user read another user's data

What could happen: a visitor, or anyone who signs up, lists your whole customer table, reads other people's messages or bookings, opens uploaded invoices and identity photos, or edits and deletes records that are not theirs. 1 min read

Keys shipped to the browser

What could happen: someone copies a key out of your app and uses it to read your entire database, issue refunds, send email in your name or run up your AI bill. 1 min read

Gaps in sign-up and login

What could happen: strangers create accounts in an app meant only for your staff or invited clients, someone registers with an email address they do not own, accounts fall to passwords leaked from other sites, or an ordinary user opens the admin page because only its menu link was hidden. 1 min read

Payment steps that can be skipped

What could happen: people get paid features, credits or orders without paying. 1 min read

Features that can be abused in bulk

What could happen: a script fills your sign-up or contact form thousands of times and each submission sends an email or SMS you pay for, someone uses your AI feature as a free chatbot running on your key, or uploads fill the storage you pay for. 1 min read

The two-account test, and how to run it safely

The most useful check a non-developer can run needs nothing beyond a browser and two email addresses you control.

It asks one question: can an ordinary user see or change something that belongs to another? OWASP calls the failure broken object level authorisation, and ranks it first in its API security list.

Run it only on an app you own, using only test accounts and test data. Testing someone else's app needs the owner's permission first, and that applies to a quick look as much as to a full test. Delete nothing during the test, and if your app has a staging copy, use that instead of the live one.

  • Create two test accounts and call them A and B. Use a normal browser window for A and a private window for B, so the two sessions stay separate.
  • As A, create one of everything your app stores: a profile, a booking, a message, an uploaded file. Put a made-up word in each, such as an unusual surname, so you can recognise it later.
  • As B, look for that word everywhere: lists, search, dashboards and exports. B should find nothing that belongs to A.
  • As A, open one of your records and copy the address from the address bar. Paste it into B's window. If the address contains a number, also try the numbers either side of one of B's own records. Each attempt should show an error or B's own data, not A's.
  • Copy the link to A's uploaded file and open it in a private window while signed out. If the file opens, anyone with the link can open it.
  • Sign out completely and paste the addresses of your dashboard, settings and admin pages. Each should send you to the sign-in page without showing any data first.
  • Write down what you did and what you saw. If something fails, that note becomes the start of your fix brief.

Then use the checks your platform already has

The two-account test goes through your app's screens, and screens can hide data the database would still hand over to a direct request. A pass is encouraging, not proof, so read the rules as well. In Supabase, the Security Advisor flags tables without row level security under the title "Table publicly accessible", along with database functions that visitors can run without signing in.

Supabase notes that some findings may be intentional, so read each one against what you meant to be public.

In Firebase, the Rules Playground in the console simulates a read or write as a signed-out visitor or as a specific user ID. Simulating a read of user A's document as user B is the most direct way to ask Firebase whether your rules keep the two apart.

Builder by builder: what the platform checks and what it leaves to you

Each builder now ships some security help.

None of them knows which of your data is meant to be private, so treat each one as a starting point and the checklist on this page as the rest of the job.

Lovable

Lovable runs a Quick scan every time you publish, covering a database review, a dependency audit and an MCP server check. 1 min read

Bolt

Bolt's Security Audit scans a Bolt Cloud database for problems such as an open permission or a missing row level security policy, and Bolt suggests reopening it after any database change. 1 min read

Replit

Replit keeps credentials in Secrets, and its documentation says API keys, passwords and tokens should not be stored as ordinary configuration. 1 min read

Base44

Base44 sets each app to Public, Private or Workspace. 1 min read

v0

v0 builds full-stack apps on Next.js by default, and its documentation notes that a variable must start with NEXT_PUBLIC_ to be readable in browser code. 1 min read

Cursor

Cursor is a code editor, so the app it helps you write lives in your own repository and runs on whichever hosting and database you chose. 1 min read

Turning a failed check into a fix your builder can apply

Builders respond best to a precise instruction that comes with a way to check the result.

A vague prompt such as "make this app secure" tends to produce a confident reply and a small change. Each brief below, like the Supabase and Firebase briefs in the checklist, says what to change, what must stay true afterwards and what the builder should show you.

Brief for a secret key found in the browser

"A secret API key is visible in the JavaScript this app sends to browsers. Move every call that uses it into server-side code, such as a Supabase Edge Function or a server route, and read the key from the platform's secrets store.

Remove it from every file that builds the screens and from any variable starting with NEXT_PUBLIC_ or VITE_. List the files you changed. I will rotate the key myself afterwards."

Brief for features that cost money

"For sign-up, password reset, contact forms, invitations and every AI feature: require a signed-in account with a confirmed email where the feature allows it, add a limit per account and per IP address with a clear error message when it is reached, and set a daily cap per account on AI usage. List each feature with the limit you applied."

Check the fix before you believe it

When the builder says it is done, run the two-account test again, rerun the platform's scan, and ask the builder to paste the current policies or rules so you can read them line by line against your one-line description of who should see what.

If a key was exposed, rotate it in the provider's dashboard yourself and confirm the old one stops working. The builder cannot recall a copy someone has already taken.

What you get back

The report is written for the person who built the app, not for a security team.

Every finding opens with what a stranger could do and whose data or money it affects, in plain English, before any technical detail.

  • An access table for your data: each table or collection down the side, a signed-out visitor, user A and user B across the top, and in each cell what should happen beside what did happen.
  • For each finding: what was tried, the evidence with secrets and personal data redacted, the business impact and a severity rating.
  • A fix brief for each finding, written to paste back into your builder, with the check that will show whether the fix worked.
  • A list of every key found in the browser or in your code, saying which to rotate and where.
  • Checks that found nothing, recorded as results for the accounts and build tested, so you can see what was covered.
  • Each finding's OWASP Top 10:2025 category, so a developer you bring in later can place it quickly.
  • One retest of the reported findings after your fixes, requested within the window set in your statement of work, with each finding then marked fixed, partially fixed, still reproducible or not retested.

Keeping the app in shape after launch

An AI-built app changes every time you prompt it, and a change to one screen can quietly rewrite a rule elsewhere.

A few habits keep this vibe coded app security work from going stale.

  • Rerun the two-account test after any change that touches data, sign-in or payments, and reopen your platform's security page after every database change, as Bolt advises.
  • If your Supabase project was created before 30 May 2026, know what that year's change to table access does and does not do. Supabase announced that from 30 October 2026, new tables in existing projects are no longer reachable through its Data API until access is granted, while tables that already existed keep the access they had. Row level security still decides which rows each user sees.
  • Keep production keys away from your coding agent. Give it test credentials, and read the commands it wants to run before approving anything that touches real data.
  • Set spending limits or billing alerts with every paid provider before you announce the app, not after the first surprise invoice.
  • If you find real data exposed, close the gap first, rotate any exposed keys and work out whose information was reachable. An organisation covered by the Privacy Act 1988 must notify affected people and the OAIC when a data breach is likely to result in serious harm to them, so get advice early if personal information may have been accessed.
  • When the app outgrows the builder, with its own server code, several customer organisations or complex billing, a web application and API penetration test or a secure code review becomes the better fit.

Frequently asked questions

Vibe coding is a way of building, and the risk sits less in the tool than in publishing without checking. The builder writes code that makes the screens work, and nobody may have asked it what happens when someone skips the screens and talks to the database directly. Lovable's documentation says you are responsible for making sure your app meets the security requirements of its use case, and Base44's says you are responsible for your app's security settings. The practical answer is to run the checklist on this page before real users or payments arrive, and to get a second look when the app holds personal, health or financial information.

Not on its own. Supabase designs the publishable key, and the older anon key, to be visible in the browser, and it reaches only what row level security allows. The risk is a table without row level security, or with a policy that lets everyone through. The secret key and the legacy service_role key are different: they bypass every policy and must not appear in browser code.

It covers part of it, and it is worth running before every publish. Lovable's Quick scan reviews the database each time you publish, Bolt's Security Audit looks for missing or open database policies, and Base44's scan looks for open data, misplaced credentials and login gaps. A scan cannot know which of your data is meant to be private, whether your payment flow can be skipped, or whether a reasonable-looking rule still lets user B read user A's records. The two-account test, and a check by someone who tries those things deliberately, answer that.

No. Run them only on apps you own, with test accounts you created. Testing a system you do not own needs the owner's permission first, and that applies to a quick look as much as to a full test. If you are worried about an app you use, contact its owner or the platform it is built on.

The vibe-coded app security check has a fixed shape. It concentrates on the five areas on this page (database rules, keys, sign-in, payments and bulk abuse) in builder-made apps on Supabase or Firebase, and its report is written for a non-developer. A web application and API penetration test is scoped around a custom application's routes, roles and business rules, and suits apps with their own server code, several customer organisations or complex billing.

Clever Ops quotes each check after a scoping call rather than publishing prices, because the effort follows what the app holds: how many tables or collections, user roles, payment flows and paid features it has. Bring your answers to this checklist to the call, and it can start from what you have already found.

Scope the right test for your application

Tell us what you have built, who uses it and when it needs to launch. You will get a plain-English recommendation: a website audit, a web application test or a referral to a specialist.