Guide
Lovable Supabase data exposed: check RLS on your own app
Published November 19, 2026 · Guides
What Crissy Field counted in 159,041 Lovable projects, why a public Supabase key is not the lock, and a 10-minute RLS check for an app you own.
This guide is for people who built an app with Lovable, Bolt, or Cursor and store data in Supabase. It explains a November 2026 study of Lovable projects, then a check you can run on a project you own. It does not name any app or person from the study. Every count below comes from the researchers' own write-up, including the limits they put on those counts.
Run the checks only on an app you own or are allowed to administer. Do not point them at someone else's project, URL, or key.
What was counted
The write-up is from Crissy Field, a security firm in Hamburg, and it is in German: Lovable: Zahlreiche erstellte Apps legen sensible Daten offen. They worked with the newspaper Handelsblatt. Lina Knees reported the results there on November 2, 2026. Crissy Field says their own page is a later pass, with updated figures compared with that article. The numbers here are from that page.
Using the public web archive Common Crawl, they identified 159,041 Lovable projects from December 2025 through September 2026 and analyzed them. Of those, 34,545 used Supabase. They focused on Supabase because the connection is straightforward to inspect and, in their judgment, it is the database Lovable projects use most. Lovable's own database features, offered since the end of 2025, were not part of the analysis. The firm says comparable misconfigurations are possible there. They did not examine them.
They asked whether sensitive data could be retrieved with no one logged in. First they looked at records the browser already receives when the page loads. Then they sent further read-only requests with the same API key the page already gives the browser.
24,664 websites sent Supabase records on that first load, with no login and no further interaction. The researchers say that, by itself, is not a security problem: the records can be meant for public display. The extra read-only requests then found records containing email addresses in 10,560 tables, across 7,403 of those 24,664 websites (30%).
What 30% does not mean
An email address is only a signal. It can be a public contact or test data, and personal records with no email address are missed. Crissy Field could not measure how large those two effects are, and says they partly cancel. The 30% figure is not a confirmed leak rate. It applies only to the 24,664 websites they looked at more closely. It is not 30% of all 159,041 projects, and not 30% of the 34,545 that used Supabase.
Common Crawl does not support a claim about every Lovable app. The counts are not a measurement of Bolt, Cursor, or every Supabase app. Datasets were retrieved only in part, not downloaded in full, so the case numbers below are records they actually downloaded. The stores can be larger. They do not publish the access paths.
What was readable without a login
The write-up describes patterns, not named products. In the records they downloaded:
- At a German lifestyle forum, more than 80,000 profiles were readable, with full names, email addresses, dates of birth, and gender. More than 200,000 chat messages could be read as well.
- At several event organizers and restaurants, tens of thousands of ticket and meal-sale records were readable with no login, including email addresses, phone numbers, postal addresses, payment information, and ticket codes.
- At a building manager, AI-generated summaries of internal email were readable, including sensitive information about tenants, owners, and business partners.
- At one service provider, more than 1,000 records held identity-document details, including passport numbers, expiration dates, and nationalities. The researchers note that this data could be used for identity misuse.
- Other readable material included tens of thousands of contracts, invoices, and personal photo albums, and internal WhatsApp conversations.
- In one case, 280,000 emails that had been sent to a provider's customers, along with newsletter signups, waitlists, and contact and support requests.
Data of this kind can make phishing, ticket misuse, or identity misuse possible, depending on what is in it. The firm could not establish whether anyone had misused it.
Faulty access rights show up in hand-written apps and in apps written with AI. On Lovable, database connections follow repeating patterns, so one misconfiguration can be searched for across many apps, and a path that works once might transfer with little extra effort. Someone without a technical background has a harder time seeing it. The firm says to review access rights, interfaces, and the separation between accounts before real customer data is processed, and again after substantial changes. An automated check does not replace that.
Why the key in the browser is not the lock
The browser client uses a publishable key. Older projects still call it the anon key. The API keys guide says that key is safe in a web page or in source code: anyone can read it, and it only reaches what row level security allows. The anon key is the legacy form of it. The securing-your-data guide says the anon key identifies the project, is not a secret, and has to be paired with row level security and least-privilege grants. A signed-out request runs as anon. A signed-in request runs as authenticated. The secret key and the older service_role key bypass row level security and stay on a server. An anon key in the page is expected. A secret key there is the service role card.
A sign-up, magic link, or password reset that fails with the message email rate limit exceeded is a different failure. The publishable key in the page is not what returns that 429. The email rate limit guide is the one for that error.
The tables guide says a table in public is reachable through the Data API, and that until you enable row level security and write a policy, anyone holding the publishable key can read and write every row. Enabling it with no policy does the opposite: the API returns no rows until a policy exists. Postgres calls that default deny. The table owner and any role with BYPASSRLS still see the rows, so the SQL editor can show every row while the API shows none.
to anon using (true) does open the table. The row level security guide says it grants every signed-out visitor read access to every row that role can already reach. Use it only for data meant to be public. The same shape for authenticated lets every signed-in user read every row. The advisor flags USING (true), USING (1=1), and WITH CHECK (true). Postgres ORs permissive policies, so a stricter one does not cancel using (true). Restrictive policies are ANDed, and a row must pass all of them. A column that reads PERMISSIVE is the default type. It does not mean the expression is true.
A policy does not revoke grants. On existing projects a new table in public can start with select, insert, update, and delete already granted to anon, authenticated, and service_role. Not every project grants those automatically. If anon can still write, a select policy does not close the write. A missing grant fails with 42501 before any policy runs. The Table Editor enables row level security when you create a table in the dashboard. A table created with SQL does not, and a policy does nothing until you enable it. The advisor calls that "security policy not enforced."
Check your own app in about 10 minutes
Use the SQL editor in your own project. For the request at the end, copy the project URL and publishable key from Settings, then API Settings. On an older project that still shows only the legacy anon key, put that key in the same header. Do not use the secret key or the service_role key. They bypass row level security, so a successful read says nothing about a visitor.
1. List tables with row level security off
This is the query in the tables guide. In pg_tables, rowsecurity is true when row level security is on and false when it is off.
select tablename, rowsecurity
from pg_tables
where schemaname = 'public'
order by tablename;Every table the app uses should show true. A false row is the first fix. Security Advisor reports the same cases: lint 0013 ("table publicly accessible") when row level security is off, and lint 0007 when a policy exists but is not enforced. In Studio that check sits with Health Advisor and Performance Advisor.
2. Spot policies that allow every row
The tables guide lists policy name, command, and roles. It does not show the expression. Postgres stores USING in qual and WITH CHECK in with_check, so include those columns:
select tablename, policyname, permissive, cmd, roles, qual, with_check
from pg_policies
where schemaname = 'public'
order by tablename, policyname;On a private table, true or (1 = 1) in qual or with_check is lint 0024, "security policy allows unrestricted access." A roles value of public applies to every role, including anon, which is what CREATE POLICY does when you omit TO. Row level security with no policy is closed to the API (lint 0008). Do not open it with using (true). Leave it, add an owner check, or use using (false) as an explicit refusal. Keep using (true) only for a public select. The USING (true) card is the short version.
3. See which commands anon can still run
The row level security guide says to check grants before you change a policy. It does not print this SELECT. The view is the standard catalog of table privileges.
select table_name, grantee, privilege_type
from information_schema.role_table_grants
where table_schema = 'public'
and grantee in ('anon', 'authenticated')
order by table_name, grantee, privilege_type;On a private table, anon should not have insert, update, or delete, and often should not have select. authenticated should have only the commands the signed-in app uses. The grants card is the same check in shorter form.
4. Request one private table while signed out
Supabase's API quickstart reads a table with the publishable key on the apikey header. Point it at one private table from step 1, on your own project:
curl "https://<PROJECT_REF>.supabase.co/rest/v1/<table>?select=*" \
-H "apikey: <PUBLISHABLE_KEY>"Put the key on apikey only. Publishable keys are not JWTs, so do not send them as Authorization: Bearer. Do not call GET /rest/v1/ to list routes: that root accepts secret keys, and a publishable key gets a 401 there even when a table route works. For a private table, an empty result or error 42501 is what you want. Empty means a grant exists and no policy returned a row. 42501 means the grant is missing. Rows coming back mean a signed-out client can read them. Stop there. A table you opened on purpose with to anon using (true) should return rows.
This does not prove user B cannot read user A. auth.uid() is null when nobody is signed in, so auth.uid() = user_id already hides rows from this curl. The cross-user check needs a second test user, which is on the RLS-off card. Trust the API response, not a select in the SQL editor.
5. Fix the tables that failed
Replace your_table, allow_all, and user_id with the names from your queries. user_id is only the owner column in Supabase's example. The block follows the row level security guide: enable row level security, take the client grants back, grant signed-in users only what they need, then one policy per command. Give anon nothing on a private table. If signed-in users only read, grant select and skip the write policies. Until a policy exists, the API returns no rows, so the app can look empty until you finish.
alter table public.your_table enable row level security;
revoke all on table public.your_table from anon, authenticated;
grant select, insert, update, delete on table public.your_table to authenticated;
drop policy "allow_all" on public.your_table;
create policy "Users can view their own rows"
on public.your_table
for select
to authenticated
using ( (select auth.uid()) = user_id );
create policy "Users can create their own rows"
on public.your_table
for insert
to authenticated
with check ( (select auth.uid()) = user_id );
create policy "Users can update their own rows"
on public.your_table
for update
to authenticated
using ( (select auth.uid()) = user_id )
with check ( (select auth.uid()) = user_id );
create policy "Users can delete their own rows"
on public.your_table
for delete
to authenticated
using ( (select auth.uid()) = user_id );For a public table, keep using (true) on select only and grant anon select only. Do not grant writes with an always-true check. Run the curl again. The private table should no longer return rows, and Security Advisor lints 0013 and 0024 should be gone unless the public read was intentional.
If the app reads a view, check that separately. Views bypass row level security by default. The views card shows the check. Then search the JavaScript your own site ships for service_role and sb_secret. The publishable key and the anon key belong in that bundle. The secret key does not. An OpenAI, Anthropic, or Stripe secret in that same JavaScript is the API key guide.
What a passing check does not mean
An empty response means anon is not receiving those rows. It does not prove every signed-in user, view, or storage bucket is right. The study did not measure Lovable's own database, so this SQL does not apply there, and it does not say Lovable, Bolt, or Cursor was breached as a platform. The records came back from the projects' databases to the key those pages already give the browser. Crissy Field's limit still holds: an automated check does not replace a review before real customer data is processed. A Lovable publish dialog that lists Resolve findings is a different screen. The publish-block guide is the one for that block, including a table without per-row rules on the built-in database. The SQL on this page stays the check for a Supabase project you administer.
The daily card
One break a day: the symptom, the cause, a prompt for your own project, and a short check. The address is not on the list until you confirm it.
Sources
- Crissy Field: Lovable — Zahlreiche erstellte Apps legen sensible Daten offen
- Supabase: Tables and data
- Supabase: Row Level Security
- Supabase: API keys
- Supabase: Securing your data
- Supabase: Advisors
- Supabase: Build an API route (signed-out request)
- PostgreSQL: pg_tables
- PostgreSQL: pg_policies
- PostgreSQL: CREATE POLICY
Related cards
- Supabase tables ship with row level security off
- A policy uses USING (true) on private rows
- Table grants stay wide open after policies are added
- A view bypasses row level security
- The service role key is in the browser bundle
- Supabase sign-up fails with "Database error saving new user"
- Supabase .single() fails with "JSON object requested, multiple (or no) rows returned" (PGRST116)