# Is my Lovable app leaking data without login? A Supabase RLS audit checklist after the Crissy Field study

> Canonical page (link this when citing): https://unbreakmyapp.vercel.app/fixes/lovable-app-leaking-data-without-login-audit-checklist.html
> Category: Database / Supabase RLS | Tools: Lovable, Bolt, Cursor, Replit, v0 | Published: 2026-11-16 | Updated: 2026-11-16
> Weakness type: CWE-862 Missing Authorization (https://cwe.mitre.org/data/definitions/862.html), CWE-200 Exposure of Sensitive Information to an Unauthorized Actor (https://cwe.mitre.org/data/definitions/200.html)

## The error

News: a study found thousands of Lovable apps returning Supabase records to visitors who never logged in / Lovable Quick scan or Supabase Security Advisor flags a table without row-level security or an access rule that lets everyone through / a logged-out browser tab shows other people's names, emails or orders in the Network tab / I am not sure whether my published app exposes customer data

## Why it happens

In November 2026 the German security firm Crissy Field, working with Handelsblatt, published a study of 159,041 Lovable projects it found in Common Crawl data from December 2025 to September 2026. 34,545 of them used Supabase, and 24,664 sites sent Supabase records as soon as the page loaded, with no login. The researchers point out that this alone is not a problem, because some data is meant to be public. But with further read-only requests using the same public API key they found records containing email addresses in 10,560 tables across 7,403 of those 24,664 sites, with examples including passport numbers, chat messages, ticket and payment details and internal emails. They stress that their 30% figure is not a confirmed leak rate and that the sample is not representative of all Lovable apps. Nothing was hacked: the cause is the same database setting covered across this site. A Lovable, Bolt, Cursor, Replit or v0 app that talks to Supabase from the browser ships the publishable (or legacy anon) key in its code, and Supabase says anyone can read that key, so it only reaches what Row Level Security allows. Supabase also warns that a table in an exposed schema without RLS is readable and writable by any role with a grant on it. So the leak happens when a table has RLS switched off, has a policy that uses (true) for everyone, is read through a view that bypasses RLS, or sits in a public storage bucket. Lovable's own docs say its Quick and Deep security scans help find common issues but cannot guarantee complete security, and that you are responsible for your app's security. The audit below takes about ten minutes per app and only uses your own app and your own Supabase dashboard.

## How to fix it

1. Only test apps you own or are allowed to test. Open your published app in a private (incognito) window without logging in, open DevTools > Network, filter by 'rest/v1' and click through every public page. Read each response: anything other than data you meant to be public (names, emails, phone numbers, orders, messages, files) is a leak.
2. Try the tables your app does not show. Copy your project URL and publishable key from the app's code or the Settings > API Keys section of the Supabase Dashboard, then for each table run: curl 'https://<project-ref>.supabase.co/rest/v1/<table>?select=*&limit=1' -H 'apikey: <publishable key>'. Supabase says to send publishable keys on the apikey header. Any row that comes back is readable by every visitor on the internet. An empty list [] or a 401 or 42501 error means that table is closed to logged-out users.
3. Run the built-in scanners. In Supabase open Advisors > Security Advisor and fix every 0013 rls_disabled_in_public, 0007 policy_exists_rls_disabled, 0024 permissive_rls_policy, 0010 security_definer_view and 0002 auth_users_exposed finding. In Lovable, open the project Security view and run the Deep scan as well as the Quick scan that runs when you publish. Treat a clean scan as a minimum, not proof.
4. Turn RLS on for every table in the public schema: alter table public.<table> enable row level security; Then list what is still open with select tablename, rowsecurity from pg_tables where schemaname = 'public'; and review every policy in Lovable under More > Database > Manage > Policies or on the policies page of the Supabase Dashboard.
5. Replace open policies. Any policy whose USING or WITH CHECK is just true, or that applies to the anon role on a table holding personal data, lets everyone through. Rewrite it to check ownership, for example using ((select auth.uid()) = user_id), and keep public read access only on tables that really are public, such as published blog posts.
6. Remove grants you do not need. Supabase now advises that on projects that still grant anon and authenticated by default you revoke those grants, because adding policies does not take them back: revoke all on table public.<table> from anon, authenticated; then grant back only what each role needs, for example grant select, insert on table public.<table> to authenticated;
7. Check the other doors: views (set security_invoker = true or move them out of the public schema), storage buckets (Supabase says anyone with the URL can read files in a public bucket, so keep IDs, invoices and private photos in a private bucket with storage policies), and any place an AI shortcut put the service_role or sb_secret_ key into browser code.
8. Test as two different users. Sign up two test accounts and confirm that account A cannot read, edit or delete account B's rows, either in the app or with the curl test above using A's access token. Lovable's own pre-publish checklist asks you to verify that users cannot access other users' private data. Also check that a normal user cannot make themselves admin or Pro.
9. Repeat the logged-out tests from steps 1 and 2. Every private table should now return [] or an error. If real customer data was exposed before you fixed it, check your Supabase logs for unknown access, rotate any keys stored in tables, and follow your privacy obligations for notifying affected people (see our first-steps guide for a reported security hole).
10. Keep it fixed: add a project rule that every new table must enable RLS with owner-based policies in the same migration, re-run the Security Advisor and Lovable scan after every schema change, and re-do the logged-out test before each launch.

## Error codes this fixes

- `Lovable Quick scan: tables without row-level security, or access rules that let everyone through` (Lovable security scan): https://unbreakmyapp.vercel.app/errors.html#lovable-quick-scan-tables-without-row-level-security-or-acce

## Fix prompt (paste into Lovable, Bolt, Cursor, Replit or v0)

```text
Security audit: I need to check whether my app leaks Supabase data to visitors who are not logged in. Do not disable RLS, do not use (true) policies and never put the service_role or sb_secret_ key in frontend code. 1) List every table, view and storage bucket in my Supabase project and say for each one whether it should be public, readable by signed-in users, or only by the owner. 2) For every table in the public schema, write a migration that enables row level security, revokes all from anon and authenticated, grants back only the privileges each role needs, and adds owner-based policies using ((select auth.uid()) = user_id) (or the right ownership column). 3) Set security_invoker = true on any view in the public schema, or move it to a private schema. 4) Make any bucket holding private files private and add storage policies limited to the owner's folder. 5) Give me a list of curl commands using only the publishable key that I can run to prove that no private table returns rows to a logged-out visitor, and a two-account test that proves user A cannot read user B's data. Explain each change in one line.
```

## FAQ

### How many Lovable apps were leaking data?

Crissy Field analysed 159,041 Lovable projects found in Common Crawl (December 2025 to September 2026). 34,545 used Supabase and 24,664 sent Supabase records on page load without login. With extra read-only requests they found records containing email addresses in 10,560 tables across 7,403 of those sites. The researchers say this 30% figure is not a confirmed leak rate and the sample is not representative of all Lovable apps.

### Was Lovable or Supabase hacked?

No. The study describes apps whose own database access rules let anyone read data with the public API key. The fix is in each app's Row Level Security policies, grants, views and storage buckets.

### How do I check if my Lovable app exposes data without login?

Open the published app logged out in a private window and read the rest/v1 responses in DevTools, then request each table with curl using only the publishable key on the apikey header. Any table that returns rows is readable by everyone. Then run the Supabase Security Advisor and Lovable's Deep scan.

### Is the Lovable security scan enough?

It is a useful first check, but Lovable's docs say its scans help identify common issues and cannot guarantee complete security, and recommend a professional review for apps handling sensitive data. Always test with a logged-out visitor and with two separate user accounts.

### Is it a problem that my Supabase key is visible in the browser?

Not by itself. Supabase says the publishable key is meant to be public and only reaches what Row Level Security allows. It becomes a problem when a table has RLS off or an open policy. The secret or service_role key must never be in the browser.

## Sources (official documentation)

- [Crissy Field: Lovable, Many Apps Built on the Platform Expose Sensitive Data (study)](https://www.crissyfield.de/research/lovable-en/)
- [Lovable: Security overview (Quick scan and Deep scan)](https://docs.lovable.dev/features/security)
- [Lovable: Security best practices (checklist before publishing)](https://docs.lovable.dev/tips-tricks/security-best-practices)
- [Supabase: Row Level Security](https://supabase.com/docs/guides/database/postgres/row-level-security)
- [Supabase: API keys (publishable vs secret, apikey header)](https://supabase.com/docs/guides/api/api-keys)
- [Supabase: Securing your API](https://supabase.com/docs/guides/api/securing-your-api)
- [Supabase: Database Advisors (Security Advisor lints)](https://supabase.com/docs/guides/database/database-advisors)
- [Supabase Storage: Bucket fundamentals (public buckets)](https://supabase.com/docs/guides/storage/buckets/fundamentals)

## Related fixes

- [Supabase table has RLS disabled (public Data API access)](https://unbreakmyapp.vercel.app/fixes/supabase-rls-disabled-table-public.html)
- [Supabase RLS is on but every user can read every row: fix USING (true) and auth.uid() is not null policies](https://unbreakmyapp.vercel.app/fixes/supabase-rls-policy-using-true-any-user-can-read.html)
- [Supabase view shows every user's data even with RLS on: fix Security Advisor 0010 security_definer_view](https://unbreakmyapp.vercel.app/fixes/supabase-view-bypasses-rls-security-invoker.html)
- [Any user can make themselves admin or Pro: Supabase RLS lets users update their own role, plan or is_admin column](https://unbreakmyapp.vercel.app/fixes/users-can-update-own-plan-or-role-column.html)
- [AI "fixed" my Supabase error by disabling RLS or using the service_role key: how to undo it safely](https://unbreakmyapp.vercel.app/fixes/ai-fix-disabled-rls-or-swapped-service-role.html)
- [Supabase service_role key exposed in frontend code](https://unbreakmyapp.vercel.app/fixes/supabase-service-role-key-exposed.html)
- [Supabase Storage upload fails: new row violates row-level security policy (403)](https://unbreakmyapp.vercel.app/fixes/supabase-storage-upload-403.html)
- [Someone reported a security hole in my vibe-coded app: what to do first](https://unbreakmyapp.vercel.app/fixes/vibe-coded-app-security-hole-reported-first-steps.html)

---
Unbreak My App: free fixes for broken vibe-coded apps. https://unbreakmyapp.vercel.app/
