AI app builders such as Lovable, Bolt, Base44, Replit and v0 turned "I have an idea" into "I have a working app" in an afternoon. Thousands of real products now run on code nobody typed by hand, with real users, real payments and real personal data.
The question this guide answers is simple: is the app you built safe to put in front of those users? We cover how responsibility is split between you and the platform, the security gaps these apps show most often, how to check them, and how to fix them with the same builder. For the wider topic of AI-written code, see our guide to vibe-coded app security.
Who Is Responsible for What
When you build on a platform, security is shared, much like in the cloud.
| The platform is responsible for | You are responsible for |
|---|---|
| Its own servers, hosting and accounts | The access rules of your app's data |
| The security of the builder itself | Which keys and secrets your app exposes |
| Isolation between its customers' projects | What each of your users can see and do |
| Patching the infrastructure | The logic of your features: payments, invites, roles |
Most incidents involving AI-built apps were not platform breaches. They were apps whose data was readable because the app's own rules allowed it.
Why AI-Built Apps Have Similar Weak Spots
Builders tend to generate apps on a small number of backend patterns, very often a hosted Postgres database such as Supabase that the browser talks to directly. That design is fast and perfectly safe when access policies are correct. When they are missing or too broad, the database is effectively public, because the key the browser uses is, by design, public.
This is not theoretical. In 2025, a researcher disclosed CVE-2025-48757, describing how many apps generated with Lovable exposed data because their row level security policies were missing or insufficient. The same year, researchers reported an authentication flaw in Base44 that could let outsiders into private apps, which the platform fixed quickly. The lesson is not that one builder is unsafe. It is that the rules protecting your data have to be checked, app by app.
The Most Common Security Gaps in AI-Built Apps
Open or missing database policies
If your app uses Supabase, every table needs row level security turned on and policies that limit each user to their own rows. Common mistakes: RLS turned off on a new table, a policy that allows everyone to read, or a policy that checks that a user is logged in but not that the row belongs to them. Our dedicated guide to Supabase security and RLS goes table by table through what to check, based on Supabase's own documentation.
Secrets in the browser
The public "anon" or "publishable" key is meant to be in the browser. A service role key, a payment provider's secret key or an AI provider's API key is not. Builders sometimes place these in frontend code to make a feature work. Anyone who opens the developer tools can copy them.
Admin checks only in the interface
The admin panel is hidden from normal users, but the database calls or API routes behind it are not protected. A normal user who calls them directly gets admin powers.
Logic that trusts the client
Prices, plan limits, discounts and roles calculated in the browser and sent to the backend can be edited before they are sent. If the server or database accepts them as is, users can upgrade themselves or pay less.
No rate limits
Unlimited sign-ups, logins and password resets invite abuse: password guessing, fake accounts and, if your app calls an AI model, a large bill.
Storage buckets and file links
Files uploaded by users (invoices, IDs, photos) often land in a storage bucket. If the bucket is public or file names are predictable, other users or outsiders can download them.
A Checklist by Platform Pattern
| Check | Lovable / Supabase-based | Bolt | Base44 | Replit / v0 |
|---|---|---|---|---|
| Database access rules on every table | Critical | Critical when using Supabase | Check entity permissions | Depends on backend chosen |
| No secret keys in frontend code | Critical | Critical | Critical | Critical |
| Admin and role checks enforced on the backend | High | High | High | High |
| Storage buckets private, links signed | High | High | High | High |
| Rate limits on auth and costly endpoints | Medium | Medium | Medium | Medium |
| Payment webhooks verify signatures | High if you take payments | High | High | High |
The exact setup varies by project, so treat this as a starting map, not a guarantee.
How to Check Your App Yourself
- Open the app as a stranger. Log out, open the developer tools, and watch the network tab while pages load. Note every call to the database or API.
- Read a table directly. With Supabase, the public key and project URL are in the page. If you can query a table of other people's data with them, your policies are wrong.
- Make two accounts. Sign in as user A, copy a request that loads A's data, and replay it as user B. Anything that returns A's data to B is a critical bug.
- Search the bundle for secrets. Look for "service_role", "sk_live", "secret" and your AI provider's key prefix.
- Run the builder's own security check. Fix what it reports. Then remember what it does not test.
Why the Built-In Scan Is Not Enough
Several builders now include a security check, and it is worth running. But it mostly looks at configuration: is RLS on, are there obviously open policies. It does not sign in as two users and prove that one can read the other's invoices through a policy that looks fine on paper. It does not test your payment logic, your invites or how small issues combine. That is what a penetration test does, and why we compare the two approaches in automated vs manual penetration testing.
Testing an AI-Built App End to End
Hetz tests what is live on your domain, regardless of how it was built. You put in your domain, AI agents map the app, sign in as your test users, call every database route and API they find, and try to cross every boundary. Only findings with proof reach your report, and each comes with a fix prompt written for your builder, so you can paste it into Lovable, Bolt or Base44 directly.
Fixing Issues Inside the Builder
Builders respond well to precise instructions. A good fix prompt names the table or endpoint, the evidence and the rule:
"The table invoices can be read by any signed-in user. A request as user B returned invoices owned by user A. Enable row level security on invoices and add policies so users can select, update and delete only rows where user_id equals the current user's id. Do not change other tables."
After the change, retest. A fix is done when the same attack no longer works, not when the code looks right.
Security Rules to Put in Your Prompts
The cheapest fix is the one you never need. Builders follow explicit rules well, so state them up front, in the first prompt for each feature:
- "Every table must have row level security enabled. Users can only read and change their own rows unless I say otherwise."
- "Never put secret keys in frontend code. Use a server function for anything that needs a private key."
- "Check the user's role on the server for every admin action, not only in the interface."
- "Calculate prices and plan limits on the server. Ignore any price sent by the browser."
- "Add rate limits to sign-up, login, password reset and any endpoint that calls an AI model."
- "Store uploaded files in a private bucket and share them only through short-lived signed links."
Keep these in a project-level instruction if your builder supports one, so every new feature inherits them. Rules in the prompt do not replace testing, because the model can still miss a case, but they cut the number of findings sharply and make the remaining ones easier to fix.
Before You Launch
- Turn on database access rules for every table, and test them with two accounts.
- Move every secret key to server-side functions.
- Enforce roles and plan limits on the backend.
- Make storage private and use signed links.
- Add rate limits to auth and to anything that costs you money.
- Run a full test, fix, and retest. Then keep testing as you generate new features.
If you need to estimate the budget, our guide to penetration testing cost covers the options. To see a full run, visit the home page or compare plans on pricing. When you are ready, start a scan.
FAQ