Your AI-built app works on your screen because you are signed in. A stranger isn't, and doesn't need your app at all: the database answers anyone who asks with the public key your app already ships.

What the study found

Crissy Field, working with Handelsblatt, looked at apps built with Lovable. "We examined 159,041 Lovable projects"; "Of these, 34,545 used Supabase." Then: "24,664 websites sent database records from Supabase as soon as they loaded, without requiring a login." They add, fairly, "That alone is not a security issue": some of that data is meant to be public.

The part that is: "We found records containing email addresses in 10,560 tables across 7,403 of the 24,664 websites (30%)." They also report "more than 1,000 records containing identity document details" and "More than 200,000 chat messages".

Their own caveats belong next to the numbers: "The 30% figure should therefore not be read as a confirmed data leak rate." "Our sample, drawn from Common Crawl, is also not representative of all Lovable applications." "We could not establish whether any of it had been misused."

Supabase's documentation says why this happens: "A table in an exposed schema without RLS is readable and writable by any role with a grant on it." And: "Views bypass RLS by default because they are usually created with the postgres user."

What we built, and the run

The stranger test. Before launch, it asks every table of an app twice, on a sandbox copy of the database: as nobody (signed out, with the public key the browser already has) and as the wrong user (signed in as one founder, asking for the others' rows). A table is private unless the founder's one-line public list names it, and any private row that comes back blocks the launch.

We ran it on a made-up AI pitch-deck coach with 40 sample founders and nine tables. Simulated: the code and the sandbox's rules run for real, the model's notes and fixes are scripted, and it cost nothing.

Four of nine tables failed, 1,727 private rows in all:

  • chat_messages: a stranger got 1,240 rows. Row level security was off.
  • waitlist: a stranger got 412 rows of emails and companies.
  • deck_stats, a view: a stranger got 38 rows. It was made by the owner, so it read past the rules on decks.
  • decks: a stranger got nothing. Signed in as one founder, the read rule handed over the other 37 founders' decks, with company and raise.

The model's note on that last one: "Any signed-in founder can open every other founder's pitch deck: the read rule says any signed-in user." That is why the test asks twice. Asked only as a stranger, decks passes.

A person applied the four drafted fixes, and the second pass came back with 0 rows.

Our take

"Turn on RLS" is the right advice and it isn't enough. RLS can be on and the rule can still say "any signed-in user". The only way to know what your database tells a stranger is to ask it as one, before launch, and to ask again as the wrong user. Ask your database as nobody, before a stranger does.

What it doesn't check

It only asks to read. Supabase's docs say an open table is writable too, and this version never tries a write, an update or a delete; writes come next. It trusts the public list: a table the founder lists as public is never asked. And the model never changes the database. It drafts the fix, and a person reads it and applies it.

What to do this week

  1. Sign out, open your app's network tab, and copy the public key and project URL your app sends. Ask each table for its rows with only that key.
  2. Sign in as a test user and ask for rows that belong to another user. A rule that says "any signed-in user" will hand them over.
  3. Check every view. Set it to run as the caller (security_invoker), or it reads past the rules on its tables.
  4. Write down which tables are public on purpose. Everything else should come back empty.

Which table in your app would you check first? Tell us when you book a conversation at voirlabs.io.

Sources