Lovable security: 9 holes to close before real users sign up


Lovable security comes down to 9 holes that AI-built apps leave open: tables without row-level security, rules that let everyone in, users who can make themselves admin, views that skip the rules, secret keys in the browser, edge functions that trust any caller, public file buckets, payments anyone can fake and sign-in without limits. Lovable's checks catch some of them. The rest you test yourself, in about an hour.
This guide is for a founder with a working Lovable app and real users coming next week. For each hole you get what goes wrong, whether Lovable's own checks catch it (by its docs as of November 2026) and a test you can run without being a security engineer.

What Lovable's own security checks cover

Lovable runs 2 groups of checks, as of November 2026. The automatic checks run before you publish and look at database rules, MCP servers your app offers without sign-in and packages with known flaws. The advanced checks read your whole codebase when you start them, and sort findings into 7 groups, from "Sign-in and accounts" to "Payments and paid features", according to Lovable's security docs.
Running the checks is free. Your account gets 10 free fixes, and each one comes back 24 hours after you use it. Auto-fix only handles the safe cases: common RLS mistakes, database access problems and vulnerable packages, never findings from the advanced checks.
Lovable is clear about the limit. Its docs say the checks "can't guarantee that your app is secure or replace a full security review", and that you are still responsible for your app's security. The scan is where you start, not where you stop.

The 9 holes at a glance

Hole
What goes wrong
Lovable's checks
Your test
1. Table without RLS
Anyone with the API URL reads it
Automatic
1 SQL query
2. Rule that lets everyone in
RLS is on and still open
Automatic, common cases
Read every policy
3. Editable role
A user makes themselves admin
Advanced
Edit your own profile
4. Views and definer functions
They skip RLS
Not named in the docs
List views and functions
5. Secret key in the browser
Full access to your data
Detects pasted keys, advanced
Search the bundle
6. Edge function trusts any caller
One user reads another's rows
Advanced
2 test accounts
7. Public storage bucket
Uploaded files open to all
Not named in the docs
Open a file signed out
8. Unverified payment webhook
Fake "paid" orders
Advanced
Send a fake event
9. Sign-in without limits
Leaked passwords, bot sign-ups
Leaked-password setting flagged
Check auth settings

1. Tables without row-level security

A Supabase table without row-level security (RLS) is open to anyone who has your project's URL and public key, and both ship in your app's JavaScript. Supabase's RLS guide puts it flatly: a table in an exposed schema without RLS is readable and writable by any role with a grant on it.
This is the hole behind CVE-2025-48757. In March 2025, Matt Palmer's scan of the Lovable Launched showcase found 303 endpoints across 170 projects with weak RLS, about 10.3% of the 1,645 apps checked. In November 2026, Sifted reported new research on thousands of Lovable apps that exposed passport numbers and private messages.
New tables are the risk. Each prompt that adds a feature can add a table, and the table you made last night is the one without rules. Run this in the Supabase SQL editor after every feature:

Loading editor...

select tablename from pg_tables
where schemaname = 'public' and rowsecurity = false;
Any row it returns is a table to lock before launch.

2. Policies that let everyone in

RLS that is switched on can still let everyone through. The rule decides, and 2 kinds of rule are common in AI-written code: a policy whose condition is just "true", which every row passes, and an insert or update policy without a "with check" part, which lets a user write a row that claims to belong to someone else.
The first version of Lovable's scanner checked only that a policy existed, not whether it worked, Palmer wrote in 2025. Today's automatic check flags "a rule that lets everyone in", per Lovable's docs. It can't know who should see what in your app. Only you know that.
List every policy and read each one out loud as a sentence:

Loading editor...

select tablename, policyname, cmd, qual, with_check
from pg_policies where schemaname = 'public';
A rule for user data should tie the row to the person asking, like this:

Loading editor...

create policy "owners read their projects" on public.projects
for select using ((select auth.uid()) = owner_id);
A "qual" of true on a table with personal data is a hole, unless that table is meant to be public.

3. Users who can make themselves admin

A user can make themselves admin when the role sits in a place they can edit. 2 places cause it. A profiles table with a role or isadmin column, where the update rule only checks that the row is theirs. And Supabase user metadata: the RLS guide warns that raw_user_metadata can be updated by the signed-in user, so it is "not a good place to store authorization data".
Hiding the admin menu on screen protects nothing. The check has to live where the data lives: in the RLS policy or in the edge function, on every request.
To test it, sign in as an ordinary user, open the browser's Network tab, find the request that saves your profile and send it again with role set to admin. If the app now shows you the admin pages, so will it for anyone else. Keep roles in a separate table that only server code can write to.

4. Views and functions that skip the rules

Views and some database functions ignore the RLS rules you wrote. Supabase's RLS guide explains that views bypass RLS by default, because Postgres creates them with security definer. A view over a protected table hands out every row its policies were meant to hold back.
Functions marked security definer run with the rights of whoever created them, which is often a role that skips RLS. Supabase says to never create one in a schema exposed to the API, and to pin search_path on each one.
Lovable's docs don't name either one among the automatic checks, so look yourself. In the Supabase dashboard, open Database, then Views and Functions. For each view in the public schema, on Postgres 15 and above, add security_invoker = true so it obeys the table's rules. Move each security definer function out of the public schema, or replace it with a plain policy.

5. Secret keys in the browser

A secret key in your frontend code gives whoever finds it full access to your database or your paid accounts. Your Supabase publishable key (the anon key, in older projects) is meant to be public. The secret key is not: Supabase's API keys guide says it bypasses Row Level Security, "so it must never leave your control". The same goes for a Stripe secret key, an OpenAI key or an email service key.
Lovable spots a key you paste into the project chat and offers to store it in Secrets, so server code can call the API instead of the browser, per its docs. A key that sat in a frontend file before that is out already. Rotate it.
To test it, open your live app, open DevTools, then Sources, and search the code for sklive, sb_secret and service_role. Any hit is a key to move to an edge function and rotate today. Supabase is deprecating the old anon and servicerole keys in early 2027, per the same guide, so this is a good week to switch to the new publishable and secret keys.

6. Edge functions that trust any caller

An edge function that runs with the secret key skips every RLS rule, so it has to check who is calling before it returns anything. AI-written functions often look up a record by its ID and return it, without asking whether that record belongs to the person who sent the request. Change the ID in the request and you get someone else's invoice.
Lovable's advanced checks look at "who can do what" across your code, per its docs. They read code. They don't send real requests as 2 different users, so test it that way yourself:
  1. Make 2 test accounts, A and B, and create a record as B
  1. Sign in as A and open the Network tab
  1. Find a request that carries a record's ID, copy it and swap in B's ID
  1. Send it again. A 401, a 403 or an empty result is right. B's data is a hole
Do it once for every function that reads or changes user data. For each hole you find, add the check to the function, or let it run as the signed-in user so RLS applies.

7. Storage buckets anyone can read

Files in a public bucket can be downloaded by anyone who has the link, whatever your rules say. Supabase's storage access guide says it skips the policy check for downloads through the public URL of a public bucket. That is fine for logos and avatars. It is a leak for contracts, IDs, invoices and anything a user uploads.
Neither of Lovable's check groups names storage buckets in its docs, so check them yourself. In the Supabase dashboard, open Storage and look at each bucket's setting. Make every bucket with user files private, then add policies on storage.objects that let each user read only their own folder.
Then test the result. Copy the URL of an uploaded file, open it in a private window where you are signed out, and see if it loads. If it does, a stranger with the link gets it too.

8. Payments anyone can fake

A payment webhook that doesn't check Stripe's signature will mark any order paid, for anyone who sends the right message. Stripe's webhook docs warn that without verification, an attacker could send fake events to "trigger actions like fulfilling orders, granting account access, or modifying records".
The same hole shows up in the database. In May 2025, Palmer inserted a record into a live Lovable app with "payment_status" set to "paid", skipping Stripe entirely, by dropping the sign-in header from the request.
Lovable's advanced checks have a "Payments and paid features" group. Test it 2 ways anyway:
  • Read the webhook function. It should verify the signature with Stripe's library and the whsec_ secret before it changes anything
  • Send a request to the webhook with a made-up body and no signature. Anything but an error is a hole
Also make sure no user can update their own plan or payment status columns. Only the webhook should write them.

9. Sign-in without limits

Sign-in settings decide how easy it is to take over an account or flood your app with bots. 3 of them matter before launch:
  • Leaked password protection. Supabase checks new passwords against Have I Been Pwned and rejects leaked ones, per its password guide. On your own Supabase it needs the Pro plan or above. On Lovable's built-in backend, turn on Password HIBP check in More, Users, Settings, Email
  • Email confirmation, so 1 person can't make 1,000 accounts with made-up addresses
Lovable's automatic database check flags leaked-password protection when it is off, per its docs. CAPTCHA and confirmation are yours to switch on.

A 1-hour Lovable security pass before launch

The whole list takes about an hour on a small app. Run it in this order, because the first steps close the holes that leak the most:
  1. Run Lovable's checks, the automatic and the advanced ones, and fix every Critical finding
  1. Run the 2 SQL queries above and lock every open table and every "true" policy
  1. Search the live bundle for secret keys, then move and rotate what you find
  1. Test every data request with 2 accounts, A and B
  1. Make every bucket with user files private and open 1 file signed out
  1. Send a fake event to the payment webhook
  1. Turn on leaked password protection, CAPTCHA and email confirmation
  1. In Lovable's workspace settings, turn on "Block publishing with critical issues"
Do steps 1, 2 and 4 again after every prompt that adds a table, a role or a payment.

When to get a second pair of eyes

Do it yourself when the app holds nothing worse than emails and you can read SQL. Get help when it holds money, health data or other people's files, or when a test returns rows you can't explain. Lovable's own docs say the same: for apps with sensitive data, "consider a review by a security professional".
Paralect is a product agency whose engineers build with AI agents and take Lovable apps to production. Its security audit finds and fixes the holes in an app for $290 to start, in 2 days. Its Lovable to production service goes further: it reviews every RLS policy, moves keys out of the frontend, adds TypeScript types and moves the app to your own Supabase and Vercel accounts with CI/CD. Paralect's engineers say on that page that most Lovable apps have tables anyone can read with the API URL. It is not for you if you are still testing the idea with 5 friends: run the checks above and keep building.
If you'd rather hire 1 engineer for the work, Paralect also places Lovable developers by the hour. For faster building, not safer, see our 8 tips for Lovable.

Questions

Is Lovable secure?

Lovable the platform and the app you build on it are 2 different things: each app is only as secure as its database rules, keys and functions. Lovable's docs say you are still responsible for your app's security. Run its checks, then the 9 tests above, before real users sign up.

Does a passed Lovable security scan mean my app is safe?

A passed Lovable scan means it found none of the problems it looks for. It can't know who in your app should see which rows, and it doesn't send real requests as 2 users. Lovable says the checks don't replace a full security review.

Is it safe that my Supabase key is in the browser?

The Supabase publishable key, or the anon key in older projects, is meant to be in the browser, and RLS is what protects your data from it. The secret key, or service_role key, must never be there: it skips every RLS rule.

Take your Lovable app to production

You built the app in days. Spend 2 more on making it safe before strangers sign up. Book a call about Lovable to production, or start with a security audit from $290.

Sources

Ship faster than
your competition

Focus on customers and sales while AI agents and our engineers ship 5x faster

Launch new products
Fix your delivery
Hit fundraising milestones
[Analytics Chart]
Wireframe v0.1
User
Sarah Chen CEO, Founder
$127k
MRR
2,847
Customers
+23%
Growth
Sales Performance
Latest Deal
Customer
Enterprise plan closed
Acme Corp · $12k/mo
© 2026 Paralect, Inc 651 N Broad St, Suite 206, Middletown, 19709, Delaware, United States