On 2 December, @paedischerrer summarized a study that has been circulating again on X: 24,664 AI-built apps sent database records to anyone who opened the page. No exploit. No login. The numbers come from Crissy Field GmbH, working with Handelsblatt. Lina Knees reported the findings on 2 November 2026.

The study is easy to over-read, so here is what it actually measured.

Crissy Field looked at 159,041 Lovable projects found in Common Crawl snapshots from December 2025 through September 2026. Of those, 34,545 used Supabase. On 24,664 of the Supabase sites, the page fetched database rows as soon as it loaded, with no login. The researchers are careful about that first count: public catalog data can look the same in a crawl. The sharper finding is what happened when they made further read-only requests with the same API key already in the page. They found records containing email addresses in 10,560 tables across 7,403 of those 24,664 sites, about 30 percent of the subset they inspected more closely.

They also say what the figure is not. The Common Crawl sample is not representative of every Lovable app. An email address might be a public contact or a test value, and records with no email would have been missed. The 30 percent is an indicator, not a confirmed leak rate, and it does not mean Lovable's own platform was breached. The failures are in the apps customers shipped. Among the serious cases they describe: a forum with more than 80,000 profiles and 200,000 chat messages left open, restaurants and event organizers exposing ticket and food-sales records, and one service with more than 1,000 identity-document records, including passport numbers.

That is the part that should change how you ship a vibe-coded site, whether you built it in Lovable, Bolt, v0, or a chat window taped to a repo.

An old paper ledger open on a wooden shop counter beside a brass padlock and a key

The anon key is supposed to be public

A lot of the commentary still talks as if the leak is "the API key in the JavaScript." The Supabase anon key is designed to ship in the browser. It is not a secret. The actual gate is row-level security: policies on each table that say which rows anon and authenticated may read or write.

If RLS is off, the anon key is a door into the table. If RLS is on and the policy is USING (true), the door is still open. That is why "we enabled RLS" is not the same as "we closed the table."

Two other gaps showed up in the same day's discussion, and both belong in a checklist:

I am not going to publish a probe that talks to a live database with a key scraped from a page. Crissy Field also withheld the access method, for the obvious reason. What I did write is a checker that stays on disk: it reads your migrations and your client source, and it tells you whether the schema you are about to ship still has those holes.

A checker that does not leave your repo

rls_check.py walks a project, parses SQL statements, and inspects a few client-side patterns. It flags:

  • tables created without ENABLE ROW LEVEL SECURITY
  • DISABLE ROW LEVEL SECURITY on a table that looks like it holds people or payments
  • policies that grant anon or public access with an always-true USING or WITH CHECK
  • GRANT … TO anon on those tables
  • views that read sensitive tables without security_invoker = true
  • client code that reads or writes a role through user_metadata / updateUser
  • a service-role secret sitting in client-side source

Catalog tables such as products are treated more gently: missing RLS or a wide-open read policy is a warning, because a public menu can be intentional, and a hard error would just train you to ignore the report. customers, orders, invoices, newsletter_subscribers, and similar names are errors.

The script is 497 lines, with 17 tests. It never opens a network connection.

Here is the heart of the policy check:

ANON_ROLES = {"anon", "public", "authenticator"} def policy_is_open(expr: str | None) -> bool: if not expr: return False compact = re.sub(r"\s+", " ", expr).strip().rstrip(";") while compact.startswith("(") and compact.endswith(")"): compact = compact[1:-1].strip() return bool(re.match(r"^\s*(true|1\s*=\s*1|1)\s*$", compact, re.I)) # After parsing CREATE POLICY ... ON <table> TO <roles> USING (<expr>): if (roles & ANON_ROLES) and (policy_is_open(using) or policy_is_open(wcheck)): severity = "error" if is_sensitive(table) else "warning" # ...emit open_anon_policy or open_public_policy 

Run it against a checkout:

python3 rls_check.py ./my-app # python3 rls_check.py --json ./my-app 

The fixture: Saltkettle Provisions, Rockland, Maine

To keep the numbers honest I built a fictional shop instead of pointing the script at a live app. Saltkettle Provisions is a smoked-fish grocer in Rockland, Maine. The marketing site is simple: a catalog, wholesale accounts, invoices, a newsletter, and a support form. The first export looks like a dozen other vibe-coded shops I have reviewed this year. Seven tables, client-side admin check, no policies.

A quiet working harbor in a small Maine town, wooden lobster traps and a white clapboard storefront in late afternoon light

I ran the checker three times: on the raw export, after the "just enable RLS" rewrite that a model will happily produce if you only ask it to turn security on, and after writing real policies.

1. The raw export: 14 errors, 1 warning

RLS check: fixtures/raw 14 error(s), 1 warning(s) ERROR role_in_user_metadata src/admin.ts:6 Authorization reads user_metadata.role. Any signed-in user can change user_metadata through updateUser; put roles in app_metadata and set them only from the server. ERROR writes_role_via_update_user src/admin.ts:11 This code writes a role through updateUser, which only mutates user_metadata. That is not a safe place to store an admin flag. ERROR table_missing_rls .../20260301000000_init.sql:15 [customers] ERROR table_missing_rls .../20260301000000_init.sql:24 [orders] ERROR table_missing_rls .../20260301000000_init.sql:33 [invoices] ERROR table_missing_rls .../20260301000000_init.sql:42 [wholesale_accounts] ERROR table_missing_rls .../20260301000000_init.sql:50 [support_tickets] ERROR table_missing_rls .../20260301000000_init.sql:58 [newsletter_subscribers] ERROR grant_to_anon .../20260301000000_init.sql:66 [customers] ERROR grant_to_anon .../20260301000000_init.sql:67 [orders] ERROR grant_to_anon .../20260301000000_init.sql:68 [invoices] ERROR grant_to_anon .../20260301000000_init.sql:69 [wholesale_accounts] ERROR grant_to_anon .../20260301000000_init.sql:70 [support_tickets] ERROR grant_to_anon .../20260301000000_init.sql:71 [newsletter_subscribers] WARNING table_missing_rls .../20260301000000_init.sql:1 [products] 

The warning on products is fair. The errors on customers and invoices are the study, in miniature. The schema also GRANTs SELECT, INSERT, UPDATE, DELETE on customers and orders to anon. Grants are not a substitute for RLS, and they make the missing policies worse.

The admin gate in src/admin.ts is the pattern from that user_metadata thread:

export async function isShopAdmin() { const { data } = await supabase.auth.getUser(); const role = data.user?.user_metadata?.role; return role === "admin"; } export async function promoteToAdmin(userId: string) { return supabase.auth.updateUser({ data: { role: "admin", promoted: true }, }); } 

If that function is your only staff check, any signed-in customer can promote themselves.

2. "We turned on RLS": 8 errors, 1 warning

This is the rewrite I see when someone pastes the first report back into the builder and asks it to enable row-level security. Every table now has ENABLE ROW LEVEL SECURITY. Every policy is USING (true). A reporting view joins customer emails to orders, and it does not set security_invoker.

RLS check: fixtures/rls-on-open 8 error(s), 1 warning(s) ERROR role_in_user_metadata src/admin.ts:6 ERROR open_anon_policy ... init.sql:79 [customers] Policy on customers grants ALL to anon with an always-true expression. ERROR open_anon_policy ... init.sql:86 [orders] ERROR open_anon_policy ... init.sql:93 [invoices] ERROR open_anon_policy ... init.sql:99 [wholesale_accounts] ERROR open_anon_policy ... init.sql:105 [support_tickets] ERROR open_anon_policy ... init.sql:111 [newsletter_subscribers] ERROR view_skips_rls ... init.sql:117 [customer_order_log] View customer_order_log reads customers, orders, invoices without security_invoker = true, so it can run as the owner and skip the underlying table policies. WARNING open_public_policy ... init.sql:73 [products] Policy on products is wide open to anon. Fine for a public catalog; unsafe if the table also holds drafts, costs, or PII. 

Fourteen errors became eight. The shop still hands out the customer table. The view would keep doing it even if you later tightened the table policies and forgot the view. The warning on products stays, because that table also stores wholesale_cost_cents.

Overhead view of a desk with a laptop, a coffee mug, a closed notebook, and a small plant

3. Real policies: 0 errors, 0 warnings

The third pass does the unglamorous work. RLS stays on for every table. Published products are readable by anon; wholesale cost is not. Customers, orders, invoices, wholesale accounts, and tickets are readable by the owner or by staff. Staff is (auth.jwt() -> 'app_metadata' ->> 'role') = 'staff'. The reporting view is created WITH (security_invoker = true). The client reads app_metadata.role and no longer calls updateUser to flip a role.

create policy "published products are public" on public.products for select to anon, authenticated using (is_published = true); create policy "owners and staff read invoices" on public.invoices for select to authenticated using ( customer_id = auth.uid() or (auth.jwt() -> 'app_metadata' ->> 'role') = 'staff' ); create view public.customer_order_log with (security_invoker = true) as select customers.email, orders.id as order_id, orders.total_cents from public.customers join public.orders on orders.customer_id = customers.id; 
RLS check: fixtures/fixed 0 error(s), 0 warning(s) No row-level security gaps found in local SQL and source files. 

A passing report is not a penetration test. It will not catch a policy that names the wrong column, and it will not catch a bucket in Storage you forgot to list in the repo. It will catch the class of mistake the study is full of: a table that shipped without a real policy, a view that bypasses the policy you did write, and a staff flag that lives where the user can edit it.

What I would run before the client sees the site

If you build marketing sites for other people, this belongs in the same pre-handover pass as the copy and the DNS. We wrote down a workflow for agencies delivering client websites with AI that keeps people on the decisions and puts a risk check before the client sees anything. Add the schema to that check. If the builder also stood up a database, open the migrations. If there are no migrations, that is its own finding.

The same question shows up earlier, when you are still choosing a tool. When I evaluate an AI website builder, "can I get the source?" is not only about leaving later. It is the difference between being able to read the policies and having to trust a chat log. I work on PolyDraft, an AI website builder for sites that need to get found, and I would rather a generated site be inspectable than impressive.

A short list I now run on any vibe-coded app that touches a database:

  1. List every table. Confirm ENABLE ROW LEVEL SECURITY on each one, not on "the project."
  2. Read every policy. If anon or public can SELECT with USING (true), ask whether that table should be in the browser at all.
  3. Recreate every view with security_invoker = true.
  4. Move staff roles into app_metadata and set them only from a server path. Delete any client call that writes a role through updateUser.
  5. Keep the service role off the client. The anon key may be in the bundle; the service role may not.
  6. Run a checker like this one on the repo, then click through the app as a signed-out user and as a normal customer. The script will not do that second part for you.

The Crissy Field write-up is worth reading in full, including the limitations. The useful takeaway is narrower than the headline: the builder will generate a database. It will not, on its own, decide who is allowed to read it. That part is still yours.