Row Level Security has been my first check on any Supabase-backed app, and I had been treating it as the finish line. Enable RLS, write a policy, move on. A scan of 159,041 Lovable projects published this month is a good argument that the finish line is somewhere else.
The short version is that a Hamburg security firm found thousands of production pages handing database rows to anyone holding the public key already sitting in the browser bundle. No exploitation, no leaked secret, no zero day. Just tables where the rules did not do what everyone assumed they did.
📊 What 159,041 Projects Actually Showed
Crissy Field GmbH ran the analysis with Handelsblatt, which reported the findings in early November. The firm pulled Lovable projects from Common Crawl, crawled between December 2025 and September 2026, and ended with 159,041. Of those, 34,545 used Supabase.
Then the numbers that matter. 24,664 of those sites sent database records as soon as the page loaded, with no login. That alone is not a bug. So they made more read-only requests with the same key the page already used, roughly what anyone with DevTools can do in a minute. Email addresses came back from 10,560 tables across 7,403 of the 24,664 sites, 30 percent of the group they examined closely.
The individual cases are worse. A German lifestyle forum exposed more than 80,000 profiles with full names, email addresses, dates of birth, and gender, plus more than 200,000 chat messages. Several restaurants and event organizers exposed tens of thousands of ticket and food sale records with phone numbers, postal addresses, payment information, and ticket codes. One service provider exposed more than 1,000 records with passport numbers, expiration dates, and nationalities.
The researchers are careful about their own numbers. They say the 30 percent figure is not a confirmed leak rate, since an email address can be a public contact address or test data, and records without an email field are invisible to the method. The Common Crawl sample is not representative. They downloaded parts of datasets, so real counts could be higher, and they did not publish how to reach the exposed tables. Read 7,403 as a floor on the number of pages I could pull rows from, not as a breach count.
🔑 The anon Key Was Never the Secret
Every article about this gets one thing slightly wrong. The anon key is supposed to be in your JavaScript. Supabase documents it as public and unprivileged. It maps requests to the anon Postgres role, and RLS decides which rows that role can touch. Finding the key in a bundle is not a finding.
Matt Palmer’s 2025 disclosure is the cleanest demonstration of how thin the distinction is. He modified a Supabase request on Linkable, a Lovable-built site, to select=* against the users table and got back the emails of roughly 500 people. Later, after the site moved the endpoint and appeared to have RLS in place for authenticated requests, removing the Authorization header was enough. The request became unauthenticated and the same endpoint handed back rows and accepted a forged insert with "payment_status": "paid".
That is the whole story in miniature. The policy existed, it was written for the wrong role, or the grant was still sitting on anon, and nobody tested the app while signed out.
⚠️ “RLS On” Is a Checkbox, Not an Authorization Model
Supabase’s RLS guide is blunt about where the danger lives: “A table in an exposed schema without RLS is readable and writable by any role with a grant on it.” Grants and policies are separate checks. Grants decide whether a role can run the operation; policies decide which rows it applies to. On existing projects, as the docs put it, a new table in public starts with every privilege already granted to all three roles: anon, authenticated, and service_role. And: “Adding policies doesn’t take those grants back.”
Put that next to the failure mode everyone hits. You run alter table x enable row level security; and write no policy, and every read returns nothing, which looks like a broken app rather than a secure one. The quick fix is a policy reading to anon using (true). RLS is now enabled, the linter is quiet, the page loads, and every row is public. The setting is on. The authorization is not there.
Lovable’s documentation is worth reading closely, because it has moved. It says RLS is enabled by default and that a linter catches missing RLS after database migrations. The founder-facing guide adds the qualifier: “But you still need to verify that your policies are correct.”
The scan documentation covers more than existence, too. The Quick scan checks “tables without per-record access control (row-level security), access rules that let everyone through, and leaked-password protection turned off,” and it runs automatically on every publish. The Deep scan is broader but does not run automatically. Then the page ends with the sentence that settles any argument about leaning on it: “These tools help identify common security issues, but they cannot guarantee complete security.”
Palmer’s statement claimed the scanner at the time “merely checks for the existence of any RLS policy, not its correctness or alignment with application logic.” Both things can be true at different times. The structural point holds either way: a configuration check cannot know your permission model. Only you can say that a support agent should see a customer’s ticket but not their passport scan.
🗂️ The CVE Has an End Date and a Dispute
There is a CVE for the original pattern. CVE-2025-48757, published to NVD on May 30, 2025, scored 9.3 by MITRE on CVSS 3.1, mapped to CWE-863 Incorrect Authorization. Its affected range reads 0 <=2025-04-15.
That date is a serious limitation of the record. Palmer’s own disclosure says the flaw hits projects created on or before April 15, 2025, “but may also affect projects created after that date,” and lists the patch status as “None available.” A range that ends on a calendar day tells a dependency scanner the problem stopped. Nothing stopped.
The record is also disputed. NVD carries the supplier’s position in the description itself: Lovable disputes it “because each individual customer of the Lovable platform accepts a responsibility over protecting the data of their application.” The entry sits in the deferred pile, with NVD stating it “is not being prioritized for NVD enrichment efforts due to resource or other concerns,” so it has no NVD-assigned score at all.
Line that up against the sample dates. The projects Crissy Field analyzed were crawled from December 2025 through September 2026, well after the CVE was published and after Lovable had shipped a security scan. The window does not tell us when those apps were built, and I will not pretend it does. It tells us when they were reachable, which matters if you are deciding whether to trust a default.
Lovable’s response to Handelsblatt, as the paper reported it, was that this is an industry-wide problem. Probably true, and not a mitigation. Every builder that wires a browser straight to Postgres produces this class of app, and the argument about who owns the risk does not change what a table returns to an anonymous curl.
🛠️ What I Check Before Shipping a Supabase App
None of this takes long. Almost nobody runs it as the anonymous visitor rather than the logged-in owner.
Read the policies, not the checkbox. Query pg_policies and look at every SELECT policy on a table holding customer data. Anything with USING (true) and anon in its role list is public, whatever the dashboard badge says.
Check the grants separately. information_schema.role_table_grants shows every privilege anon and authenticated hold in public. Revoke what the product does not need, because policies will not do it for you, and redo it after every migration. A new table arrives with grants and no policies, which is exactly when the cycle restarts.
Sign out and watch the network tab. Load the app with no session, filter for /rest/v1/, and see which requests still return rows. Then create two test users and try to read one’s rows as the other through the REST API, not the UI. RLS protects the API; the UI was never the boundary.
Keep the secret key out of the client. The service_role JWT and the newer secret key bypass RLS by design, and one VITE_ or NEXT_PUBLIC_ prefix exposes the whole schema.
Split what you cannot protect. RLS filters rows, not columns, so a table mixing a display name with a passport number leaks the passport number to anyone who can read the name. Put sensitive fields in their own table, or behind an Edge Function.
🧠 Final Thoughts
The tempting read is “Lovable is insecure,” and it is the wrong lesson. Lovable’s servers were not breached. The apps had no working rule about who could read what, and the public key did exactly what it is documented to do.
The more useful read is that “RLS is enabled” is a statement about configuration, and configuration is what linters and scanners can see. Authorization is a statement about your product: which human may see which row, under what conditions. No scanner knows that, no default can guess it, and no CVE keeps warning you after its version range closes.
If you built something with an AI builder and it holds real customer data, the work left is not a toggle. It is one afternoon of reading policy expressions, revoking grants, and clicking through your own app as a stranger.
Thanks for reading.