The Lovable data story is a missing row rule, not a break-in

2026-11-15

A German security firm did not break into Lovable (an AI app builder: you describe an app in plain language, and it writes the pages and the database wiring). Crissy Field GmbH opened apps the way a stranger’s browser would. Thousands of them, built on Supabase, answered with rows (one record in a table: one profile, one order, one message) that belonged to other people.

That is the whole story of the Lovable Supabase data exposure. The rest of this page is the lock those apps skipped, the number the headlines will get wrong, and a check you can run on your own project tonight without learning anyone else’s secrets.

The number people will quote

Mind map of the Lovable Supabase data exposure: the 30 percent number, anon vs secret key, grants and row level security, the check, what to avoid

Handelsblatt (a German business newspaper) reported the findings on November 2, 2026. Crissy Field’s English write-up is the version that circulated again on November 14, including on Hacker News, according to Privacy Affairs. The sample is Lovable projects saved by Common Crawl (a public archive that stores copies of web pages, so a researcher can study the web without knocking on every site live), from December 2025 through September 2026.

Read the funnel from the top, and stop treating the top number as the scandal.

Funnel of the Crissy Field sample: 159,041 Lovable projects, 34,545 on Supabase, 24,664 sending rows on first load, 7,403 sites with an email address

Here is the same picture in words.

  • 159,041 Lovable projects showed up in that archive. Finding a page in an archive is not a break-in of Lovable’s servers.
  • 34,545 of those used Supabase (a hosted Postgres database with a web API in front of it; Postgres is the database program, a place that stores tables and answers queries). Lovable’s own database feature, added in late 2025, was not part of the study. If your app uses only that built-in store, this paper does not clear you and does not convict you. It did not look.
  • 24,664 of the Supabase sites sent some database records as soon as the page loaded, with no login and no click. A public menu, a public event list, or a marketing page is supposed to do that. This box is not “24,664 leaks.”
  • On 7,403 of those 24,664 sites, further read-only requests, using the same public key already in the page, returned rows that included an email address. That was 10,560 tables. 7,403 divided by 24,664 is about 30 percent.

Crissy Field’s own caveat, from the English report: “The 30% figure should therefore not be read as a confirmed data leak rate. It applies only to the 24,664 websites we examined more closely.” An email address can be a public contact or a test row. The other way, a personal table with no email column would not be counted. They say those two errors partly cancel, and that they could not measure how much. The archive is also not every Lovable app. They downloaded only part of each table, so the counts of messages and passports are floors (the least they actually retrieved), not ceilings.

Start from a row

Forget the product name for a minute. You have a grid. Each column is a field, such as email. Each row is one fact. A page wants to show some of those facts, so the browser asks an API (a URL that accepts a request and sends data back) for them.

The browser in these apps does not sit down at the database itself. It talks to Supabase’s Data API (the web door in front of the database; the same family of doors includes a GraphQL URL, which is a second way to ask for those rows). To ask, the browser has to say which project it means. That name is a key, and it is already inside the page, because the page cannot call the API without it.

The path a logged-out browser walks: the public key, then the Data API, then the row rule; a grant and row level security are two different doors

Two keys, and only one is a secret

The anon key (the public project key, also called the publishable key: it tells the API “this request is a visitor who is not logged in”) is supposed to be in the JavaScript. Anyone can copy it from the browser’s view of the page. Copying it is not the attack. The researchers reused that same key. They did not need a stolen password.

The secret key (the service_role key, or the newer sb_secret key: a master key that skips the row rules) is the opposite object. Whoever holds it can read every row and change or delete records. It must not be in the page, in a frontend setting such as a variable that gets bundled into the site, or in a chat message where you paste it because the AI said the query failed.

Two Supabase keys: the anon key is designed to ship in the page, the secret key makes every row rule decorative

If a fix tutorial tells you to paste the secret key into the app “just so it works,” that tutorial is the leak.

The lock is a rule about rows

A grant (a permission that says a role may touch a table at all, for example “visitors may try to read this table”) is the outer door. RLS (row level security: a Postgres switch that, once on, hides rows from a role unless a policy allows them) is the inner door.

A policy (one rule on one table, for one role, for one action such as read or insert) is the sentence on the inner door. For the visitor role, which is not the owner of the table, the default after you turn RLS on is closed: no policy means no rows. The dangerous sentence is a policy whose condition is simply true, aimed at the visitor role, on a table of people. That sentence means “every row.” It is the correct sentence for a table of public blog posts. It is the wrong sentence for profiles, orders, messages, or identity documents.

Both doors have to be thought about. A grant with RLS off is a table with the lights on. RLS on, with no grant, means the API cannot see the table. A grant plus a true policy is a public table, whether you meant that or not.

One more distinction, then we can use it. The table owner bypasses RLS unless you force the rules onto the owner too. The visitor role is not the owner, so this mostly matters for server code that connects as the owner. The browser path in this story is the visitor path.

What was in the open rooms

Crissy Field withheld names and withheld the exact access steps, “as doing so could make further access easier.” These are categories from the rows they actually downloaded. They say the underlying tables may be larger, and they could not tell whether anyone else had already read them.

  • One German lifestyle forum: more than 80,000 profiles with full name, email, date of birth, and gender, and more than 200,000 chat messages.
  • More than 1,000 identity-document records, including passport numbers, expiration dates, and nationalities.
  • Tens of thousands of ticket and food orders, including phone numbers, postal addresses, payment information, and ticket codes. “Payment information” is their phrase. I am not upgrading it to full card numbers, because they did not.
  • AI-written summaries of internal email about tenants, owners, and business partners.
  • Contracts, invoices, personal photo albums, and internal WhatsApp messages.
  • Newsletter signups, waitlists, and support requests.
  • One case of 280,000 emails sent to a company’s customers.

Nobody had to defeat a login. The page, or a follow-up read with the page’s own public key, returned the rows. That is why “we were hacked” is the wrong lesson. A hacker is a person who gets past a lock. Here the lock was a missing sentence.

Why an AI app builder trips on this

You grade the model on one thing: the screen shows your data. The fastest way to make the screen show data is to let the visitor role read the table. The model does not feel the difference between a menu and a passport. You feel it later, when a stranger’s first page-load contains someone else’s date of birth.

That is not a claim that Lovable hid the issue. It is a claim about the reward. “Make it work” and “only the signed-in user may see this row” are different tasks. If you only ask for the first, you will often get a true policy, or a secret key dropped into the page so the error goes away.

The study also does not say every email row was a crime scene. Go back to the caveat. Some of those 7,403 sites may be showing a public contact on purpose. The passport table is not that case. The way you tell them apart is the check below, on your own project, not a headline rate.

What changed, and the hole it does not close

Supabase wrote this down as a breaking change. The rollout began on April 28, 2026. It became the default for new projects on May 30, 2026. On October 30, 2026 it was enforced on existing projects. New tables in the public schema are no longer added to the Data API, or the GraphQL API, by themselves. They need an explicit grant before a page can query them. The changelog’s sentence on the old world is the one to keep: “Existing tables are not affected in your project, they keep their current grants and stay reachable.”

So a table that was readable on October 29 is still readable on November 15, unless a person changed that table. The change also does not apply to an app that talks to Postgres directly with a connection string, rather than through the Data API. A connection string in a browser would be a worse leak, not a safer architecture.

Old Supabase tables keep the grant they had; a new table starts off the public API and still becomes public if you grant access and forget the row rule

Lovable’s changelog on November 12, 2026 added a different, narrower prompt. The entry is titled “Review critical security findings before you publish.” When you publish a project that uses the built-in backend and still has critical findings, Lovable asks you to review them. You can open the Security view, publish anyway, or ask Lovable to fix them, which spends one of your free fixes.

Read the nouns. That dialog is about the built-in backend, which is the store Crissy Field did not audit. “Publish anyway” is still a choice. A dialog at the next publish does not rewrite grants on Supabase tables that have been open since the summer. An app nobody opens again is not reviewed again.

The check, on your own app

This is a defensive look at a project you own. It is not a way to go find the apps in the study. If a logged-out window can already read a private table of yours, stop and fix that before you do anything clever.

Open the project’s Security view in Lovable and run the scan it offers. Then do not stop. A scan you have not acted on does not change a grant.

In the Supabase SQL editor (the box where the database accepts commands), list whether row security is on. row_security_on should be true for any table that holds people.

select c.relname as table_name,
       c.relrowsecurity as row_security_on
from pg_class c
join pg_namespace n on n.oid = c.relnamespace
where n.nspname = 'public'
  and c.relkind = 'r'
order by 1;

Then list the policies. You are looking for a private table whose qual (the read condition) is true, especially where the role is anon.

select tablename, policyname, roles, cmd, qual
from pg_policies
where schemaname = 'public'
order by tablename;

Then list what the visitor and the signed-in role are granted. A select grant to anon is the outer door standing open.

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;

Search the project for service_role and sb_secret. If either string is in client code, the order is: take it out, ship a build that does not contain it, then rotate the key (issue a new one and kill the old one) in the Supabase dashboard. Rotating while the old key is still inside the live page just hands the new visitor the same master key under a new name.

A reasonable policy for notes that each user owns looks like this. It is the shape, not a script to paste onto a table whose columns you have not checked.

alter table public.notes enable row level security;

create policy "members read their own notes"
on public.notes
for select
to authenticated
using (user_id = auth.uid());

authenticated means a person who has signed in. auth.uid() is that person’s id, as the database sees it. The policy says the row’s user_id must match. A public catalog can keep a true policy, on purpose, and should not use this one.

Last check: a private window, no login, your app. If you can see another person’s row, the lock is still off.

If those rows were about real people

I am not your lawyer. If the readable table held personal data, and you are in a place that follows the GDPR (the EU privacy law; the UK has its own version of the same idea), there is a clock, and it is short. Article 33 is notice to the authority, generally within 72 hours of becoming aware. Article 34 is telling the people themselves when the risk to them is high. Passport numbers and payment details are the examples that regulators treat as high. Fix the door first, so the notice is not describing a door you left open while you wrote the email.

Write down only what you know. Which table. Which columns. From about when. Whether you can tell if anyone besides a researcher fetched it. Crissy Field says it could not tell whether the data had been misused. Do not invent a “no one else looked” line you cannot support.

What I would not do

I would not paste the secret key into a chat to clear an error (here is what a coding agent can send out with your key). I would not turn RLS off to see if the screen fills. I would not treat “publish anyway” as a review. I would not assume the built-in Lovable database is covered by a Supabase study, or the reverse. I would not email the researchers asking which apps they meant. They withheld the names so that publishing the paper would not become a map.

The sentence to keep

The key in the browser is not the secret. The rule about rows is the secret. A new Supabase table now starts off the public API. An old table does not. If you built the app before October 30, 2026, or you opened a grant so the screen would fill, the check is yours. The headline number will not run it for you.

Common questions about the Lovable Supabase data exposure

Was Lovable hacked?

No. Crissy Field GmbH opened apps the way a stranger’s browser would, using the public key already in each page. Those apps answered with rows that belonged to other people because the row rule was missing.

Does the 30 percent figure mean 30 percent of Lovable apps leaked?

No. The 30 percent is 7,403 of the 24,664 Supabase sites that sent rows on first load. Crissy Field says it is not a confirmed leak rate, because an email address can be a public contact or a test row.

Is the Supabase anon key a secret?

No. The anon key is meant to be in the page. The secret key (service_role or sb_secret) skips the row rules and must never be in client code or pasted into a chat.

Does the October 30, 2026 Supabase change fix my old tables?

No. Existing tables keep their current grants and stay reachable. Only new tables in the public schema start off the Data API, and a table you grant access to still needs a row rule.

What should I do first if my readable table held personal data?

Fix the open door first, then write down which table, which columns, and from about when. If you fall under the GDPR, a notice to the authority is generally due within 72 hours of becoming aware. This is not legal advice.

Leave a comment