How a Lovable app keeps data private (the 60-second version)
- Your backend is Supabase underneath. Lovable's built-in backend, also called Lovable Cloud, includes a database, storage, authentication, realtime and functions. It "utilizes Supabase's open-source foundation" [1]. It's on by default, so most projects never need a separate Supabase account [2]. You can also connect your own Supabase project instead, which gives you the full Supabase dashboard [2].
- Your app talks to the database straight from the browser. To do that, it carries a public key, called the publishable key (older projects call it the anon key). Supabase says this key is "safe to expose online" [3]. So finding it in your page's code is not a leak. It's how the app is meant to work.
- That's why the rules matter so much. With a public key in every visitor's browser, the only thing standing between a stranger and your data is your database's access rules. Supabase calls them Row Level Security (RLS) policies. Once RLS is on, the public key can reach nothing until you add policies [4]. The policies then decide who sees which rows.
- Lovable says this too: "Missing RLS policies are the most common way app data gets exposed." [2]
In crash-test terms: the publishable key is the car key everyone gets a copy of. RLS policies are the seatbelts, and our job is to check that each one actually clicks.
The eight Lovable crash points
These are the places we aim the dummies in a Lovable app. Each one has a plain-English explanation, how we test it, and a repair prompt for Lovable.
1. A table with no rules at all
What it means: RLS is off for a table, so anyone holding the public key can read it. Supabase's own Security Advisor marks this as an error called "Table publicly accessible" [5].
How we test it: The Stranger (no account) asks for each table. If one answers, we record the table name and row count, never the rows themselves.
Typical severity: Totaled, if the table holds user data.
2. Rules that say "everyone"
What it means: RLS is on, but a policy lets everyone in, for example using (true). Lovable's Quick scan looks for "access rules that let everyone through" [6]. A policy like that is technically present, but it doesn't protect anything.
How we test it: The Stranger, then Dummy B, try to read rows they shouldn't see.
Typical severity: Totaled or Crash, depending on what's in the table.
3. Rules that check signed in, not whose
What it means: A policy lets any signed-in user read every row, instead of only their own. The safe pattern ties each row to its owner, e.g. (select auth.uid()) = user_id [4]. This one is hard to spot by reading settings, because the policy looks reasonable.
How we test it: The two-dummies test. Dummy A creates a record. Dummy B tries to read, change and delete it.
Typical severity: Totaled.
4. A user can promote themselves
What it means: Policies control rows, not columns [7]. If users are allowed to edit their own profile row, and that row also holds is_pro, plan or role, they can set those fields themselves. Supabase recommends keeping roles in a dedicated table instead [7].
How we test it: Dummy B tries to edit its own profile and flip is_pro or role.
Typical severity: Crash.
5. Files anyone can download
What it means: In a public storage bucket, "anyone who possesses the asset URL can readily access the file" [8]. That's fine for logos. It isn't fine for invoices or ID photos. Private buckets check access rules on every download, and can hand out time-limited signed links [8].
How we test it: The Stranger checks which buckets are public and whether their contents can be listed. Dummy B tries to open Dummy A's uploads.
Typical severity: Crash, if user files are exposed.
6. A real secret in the browser
What it means: The publishable key is meant to be public. The secret key (older name: service_role) is not. It bypasses every RLS policy, and Supabase warns that exposing it "puts all of your project's data at risk" [3]. The same goes for Stripe live keys or AI provider keys. Lovable's guidance: "Secrets stored in frontend code are visible to users and should be considered compromised" [9]. They belong in Secrets, used from an Edge Function [2][9].
How we test it: The Stranger downloads your app's public code and looks for known key formats. It also decodes any token it finds to see what role it carries. Anything found appears masked (sk_live_ab12…).
Typical severity: Totaled.
7. Backdoors around the rules
What it means: Some database objects can skip RLS entirely, for example a view that runs with its creator's privileges. Supabase's advisor flags this as "View bypasses row-level security" [5]. Database functions exposed to the public API can do the same if they're written that way estimate (depends on how each function is defined).
How we test it: The Stranger lists the functions anyone can call. Then the dummies check whether any of them return data the rules should have blocked.
Typical severity: Crash or Totaled.
8. An email button anyone can press 1,000 times
What it means: Supabase's built-in sign-up and sign-in endpoints come with rate limits you can adjust [10]. But a custom Edge Function that sends email, such as an invite or a "share this" feature, only has the limits you give it estimate.
How we test it: A small, capped burst: at most 10 requests to email-sending features. We check whether anything stops it.
Typical severity: Dent.
Severity depends on what's in the data. The full rules are on the methodology page.
"But Lovable already scans my app."
Yes, and you should keep using it. Lovable runs a Quick scan every time you open the publish dialog. It checks for tables without row-level security, rules that let everyone through, leaked-password protection, vulnerable dependencies and exposed MCP servers [6]. A Deep scan, which you start yourself, reviews your app's code [6]. Lovable also says these tools "do not replace a thorough security review" and that they "cannot guarantee complete security" [6].
The difference, in one line: a scan reads the blueprint. A crash test drives the car into the wall.
| Lovable's security scan [6] | Crash Dummy | |
|---|---|---|
| Looks at | Your project's settings and code, from the inside | Your live app, from the outside, the way users reach it |
| Asks | "Does this look risky?" | "Did Dummy B actually get Dummy A's data?" |
| Proves it with | A list of warnings | A replay of what happened, with redacted evidence |
| Fix comes as | Suggestions in Lovable | Repair prompts, then a Re-crash to confirm the fix worked |
Best practice estimate: run Lovable's scan, fix what it finds, then crash-test. The scan catches what it can see in the code. The crash test catches what only shows up when two real users meet.
Free self-check: 15 minutes, no code
You can do all of this yourself, right now.
- Run Lovable's Deep scan. Open the Security view in your project and start a Deep scan. The publish dialog only runs the Quick scan [6].
- If you use your own Supabase project, open Advisors → Security in the Supabase dashboard and fix anything marked ERROR [5]. (Lovable Cloud projects: estimate we haven't confirmed whether Supabase's advisor is available to you directly. Ask Lovable to "list every table and whether RLS is enabled.")
- The two-account test. Sign up twice, in a normal window and a private window. As account A, create something. Copy its link or ID. As account B, open it. You should get nothing.
- The self-promotion test. As a normal user, try to reach your admin page or a paid feature. Hidden buttons don't count. The page itself should refuse you.
- The file test. Upload a file as account A. Copy its link and open it in a private window while logged out. If it opens, ask yourself whether it should.
- The secrets test. Open your live app, press F12, go to Sources, and search for
service_role,sb_secret_andsk_live. None of them should appear. (A key starting withsb_publishable_is fine [3].) - Re-check after big AI edits. Repeat steps 3 to 5 after any prompt that touched login, profiles or the database estimate (that's where regressions usually show up).
This self-check covers the most common issues. Passing it doesn't mean your app is secure.
Repair prompts for Lovable
The easy way: every Crash Report comes with a fix plan. Click Hand this to your agent (or open the attached crashdummy-fix-plan.md) and paste the whole plan into Lovable's chat. Lovable works through it in order. Once, add our Lovable Instructions snippet in Project settings → Instructions. From then on, Lovable knows the rules for applying a fix plan: show the SQL first, never turn RLS off to make something pass (Lovable Instructions docs).
One fix at a time: paste these into your Lovable chat. Replace the words in <angle brackets>.
Each prompt follows three habits estimate (these work well with AI builders in our experience):
- Name the exact table. Vague prompts get vague fixes.
- Say what must not change, so working features keep working.
- Ask Lovable to show you the result, so you can check it.
Lovable can also show you the SQL before it applies certain database changes, depending on your migration setting [1].
No rules on a table → add owner-only rules
Turn on Row Level Security for the <tasks> table. Add policies so that a signed-in user can only select, insert, update and delete rows where user_id equals their own auth.uid(). Logged-out visitors should not be able to read anything from this table. Don't change any other tables. When you're done, list every policy on <tasks> in plain English so I can review it.Rule that lets everyone in → tighten it
The <tasks> table has a policy that allows everyone (using true). Replace it with policies that only let each signed-in user access their own rows (user_id = auth.uid()). Keep every feature working for the row's owner. Show me the old and new policies side by side.Users can make themselves Pro or admin → move the flags
Users can currently edit their own row in <profiles>, including <is_pro> and <role>. Move <is_pro> and <role> into a separate <user_roles> table that regular users can read for themselves but cannot insert, update or delete. Only server-side code (an Edge Function, for example after a verified Stripe payment) may change it. Update the app to read the plan and role from the new table. Then confirm that a regular user can still edit their name and avatar, and nothing else.Public files → private bucket with expiring links
Make the <attachments> storage bucket private. Users should only be able to upload to and download from their own folder. Show files to their owner using signed URLs that expire after 10 minutes. Don't change the <avatars> bucket, which is meant to stay public.A secret in the frontend → move it to the server
The <OpenAI / Stripe secret> key is used in frontend code. Move it into Secrets and use it only from an Edge Function. Update the app to call that function instead of using the key in the browser. Afterwards, search the frontend code and confirm the key no longer appears anywhere. Remind me to rotate the old key, because it should be treated as leaked.Email feature with no limit → add one
The <send-invite> Edge Function sends an email every time it's called, with no limit. Allow at most <5> invites per user per hour, and reject the rest with a friendly error message. Only signed-in users may call it.After any repair prompt:
Run the security scan again and tell me what changed.Then press Re-crash in your Crash Report to confirm Dummy B goes home empty-handed.
Getting your Lovable app ready for a crash test
- Verify ownership. We give you a one-line tag. Ask Lovable: *"Add this meta tag inside the
<head>of my site:<meta name="crashdummy-verify" content="YOUR_TOKEN">. Then publish."* estimate (a standard Lovable web app has an editable HTML head. Confirm on Crash Test Lab #1.) - Full Crash Test only: create two test accounts through your own sign-up page, as Dummy A and Dummy B. Use throwaway email addresses. You'll find a tip for this in your order email.
- Payments in test mode. If your app uses Stripe, we only test with Stripe test mode, never real cards.
- Lovable Cloud or your own Supabase? Both work. We test your live app from the outside, so we don't need access to your Lovable account or your Supabase dashboard.
From the lab: Crash Test Lab #1
We built our own app in Lovable and crash-tested it. Crash Track, our demo task app, goes into the lab this week. The full replay, every finding and every repair prompt will be published here. Crash Track is ours. It has no real users and no real data.
FAQ for Lovable builders
Is it bad that my anon (publishable) key is visible in my app?
No. Supabase designed that key to be public [3]. What matters is whether your RLS policies stop that key from reading things it shouldn't. That's exactly what the Stranger checks.
I use Lovable Cloud and never set up Supabase. Does this apply to me?
Yes. Lovable Cloud is built on Supabase [1], so the same rules, keys and storage apply.
Lovable's scan says I'm fine. Can I skip this?
You can, and plenty of apps will be fine. Lovable's own docs say its scans "cannot guarantee complete security" and recommend an extra professional review for apps that handle sensitive data [6]. A crash test adds behavioral proof, actually checking what Dummy B can reach, on top of the scan's code review.
Will you need my Lovable login?
No. We never ask for your Lovable or Supabase credentials. We test the live app, like your users would.
Can you test a Lovable app I didn't build?
No. We only test apps whose owner has verified them. See what we never do.
Context: why this matters
In February 2026, The Register reported on a third-party researcher's findings about one app hosted on Lovable. The Supabase backend lacked RLS and role-based access, and the app's access-control logic was inverted. The report said 18,697 user records were exposed [11]. Lovable said every project includes a free security scan before publishing, and that "it is at the discretion of the user to implement these recommendations." It also said the project included code Lovable didn't generate, and that the vulnerable database wasn't hosted by Lovable [11].
Our takeaway: the tools are getting better at warning you. The last step is still yours: making sure the warnings were fixed, and that the fix actually holds.
Crash Dummy is independent and not affiliated with Lovable or Supabase. We did not test the app mentioned above. That research belongs to its author, as reported by The Register.
Sources
All checked on 15 Nov 2026.
- Lovable Docs: Lovable Cloud. https://docs.lovable.dev/features/cloud
- Lovable Docs: Supabase integration. https://docs.lovable.dev/integrations/supabase
- Supabase Docs: API keys. https://supabase.com/docs/guides/api/api-keys
- Supabase Docs: Row Level Security. https://supabase.com/docs/guides/database/postgres/row-level-security
- Supabase Docs: Database Advisors (lints
0013_rls_disabled_in_public,0010_security_definer_view). https://supabase.com/docs/guides/database/database-advisors - Lovable Docs: Security (Quick scan, Deep scan). https://docs.lovable.dev/features/security
- Supabase Docs: Column Level Security. https://supabase.com/docs/guides/database/postgres/column-level-security
- Supabase Docs: Storage buckets, fundamentals. https://supabase.com/docs/guides/storage/buckets/fundamentals
- Lovable Docs: Security best practices. https://docs.lovable.dev/tips-tricks/security-best-practices
- Supabase Docs: Auth rate limits. https://supabase.com/docs/guides/auth/rate-limits
- The Register, 27 Feb 2026. https://www.theregister.com/2026/02/27/lovable_app_vulnerabilities