Lovable security: 7,403 sites, a public key, and the row level security check

A scan of 159,041 Lovable projects found 7,403 sites with email tables readable without login, including 1,000+ passport records. Why the Supabase key is public by design, how to check your own database, and what the 30% does not mean.

More than a thousand records with passport numbers. More than 200,000 chat messages. Both were readable without logging in, in apps built with the AI app builder Lovable, according to a research report by Crissy Field GmbH, a Hamburg security firm that worked with the German newspaper Handelsblatt. The report went around widely on 14 November.

The interesting part is not the AI. The key that opened those tables was never a secret: on Supabase, the database most Lovable projects use, the browser key is public by design. What decides who can read which row is a PostgreSQL feature called row level security (RLS). This post explains the mechanism from the vendors’ own documentation, shows how an owner checks their own project, and goes through the report’s own caveats, because the headline “30%” is easy to misread.

Nothing here was scanned, tested or tried by me against any project. All numbers come from the report and the linked documentation.

What the report found

The researchers used Common Crawl, a public archive of the web, to find Lovable projects in crawls from December 2025 to September 2026. Their funnel, in their words and numbers:

Lovable projectsfound in Common CrawlLovable projects: 159,041159,041use Supabaseuse Supabase: 34,54534,545send DB rows on loadno login neededsend DB rows on load: 24,66424,664tables with emailsafter more read-only requeststables with emails: 7,4037,403
The report's funnel, to scale. 7,403 is 30% of the 24,664 examined closely and 4.7% of all 159,041 projects found; the report itself says it is not a confirmed leak rate. Source: Crissy Field GmbH, "Lovable: Many Apps Built on the Platform Expose Sensitive Data".
Step Count Share of the step before
Lovable projects found in Common Crawl 159,041
…that used Supabase 34,545 21.7%
…that sent database records on page load, without login 24,664 71.4%
…where further read-only requests with the same key returned tables with email addresses 7,403 (10,560 tables) 30.0%

The report is careful about step three: sending data on page load “alone is not a security issue: the data may be intended for public display”, like a restaurant menu. The finding is step four. With “additional read-only requests” using the same key, the researchers retrieved more of the database and found email addresses in 10,560 tables across 7,403 sites.

The cases they describe:

  • a German lifestyle forum: more than 80,000 profiles with names, email addresses, dates of birth and gender, plus more than 200,000 chat messages;
  • event organizers and restaurants: tens of thousands of ticket and food orders with email addresses, phone numbers, postal addresses, payment information and ticket codes;
  • a service provider: more than 1,000 records with identity document details, including passport numbers, expiry dates and nationalities;
  • elsewhere: contracts, invoices, photo albums, internal messages, and in one case 280,000 emails sent to a provider’s customers.

They retrieved only parts of the data, published no access details, and “could not establish whether any of it had been misused.”

Why the key is public, and what actually protects the data

A Supabase app that talks to its database straight from the browser ships a key in its JavaScript. Supabase’s API keys guide says so plainly: the publishable key (older projects call it the anon key) is meant for “anything you ship: browser, mobile app, CLI, script”, and “anyone can read it, so it only reaches what Row Level Security allows”. The secret key (formerly service_role) “bypasses Row Level Security, so it must never leave your control”. Their own picture: the publishable key is taped to the front door and only opens the lobby; the secret key is the master key in your pocket.

So finding the key in a page is not a leak. What matters is what happens after it:

What a browser request with the publishable key goes throughPublishable keypublic, ships in the JSRole: anonauthenticated if signed inGrantsmay it use the table?RLS policieswhich rows?RLS off: every row the grants allowRLS on, no policy: no rowsusing (true): every rowSecret key → service_roleBYPASSRLS: policies never apply. Server only.
Two checks before a client touches a table: grants (may this role use the table at all) and policies (which rows). Sources: Supabase docs (API keys; Row Level Security) and PostgreSQL docs (Row Security Policies).

Supabase’s RLS guide describes two checks before a client touches a table: grants decide whether a role can run an operation on the table at all, and policies decide which rows that operation applies to. On existing projects, a new table in the public schema starts with privileges granted to the anon, authenticated and service_role roles, and tables in public are reachable through the Data API. That leaves the policies as the lock.

What the three states of a table mean, from the PostgreSQL documentation and Supabase’s linter:

Table state What the publishable key can reach
RLS off “all rows within it are equally available for querying or updating” to any role with privileges; Supabase’s linter: “Anyone with your project URL can read, edit, and delete all data in this table”
RLS on, no policy nothing: “a default-deny policy is used”
RLS on, policy using (true) every row, for that role. Fine for a public menu; on a users table it protects nothing
RLS on, policy using ((select auth.uid()) = user_id) only the signed-in user’s own rows

Row security has been in PostgreSQL since version 9.5 (January 2016). It is not new and not specific to AI builders.

One note on fairness: the report itself never says “row level security”. It speaks of “access control mistakes” and misconfigurations and gives no technical details on purpose. The explanation above is how Supabase and PostgreSQL document the mechanism, not a claim about any specific site.

Two traps worth knowing

The default depends on how the table was created. Supabase’s API security guide: “Tables created through the Supabase Dashboard have RLS enabled by default. Enable RLS explicitly for tables created in the SQL Editor or through another tool”. A migration script, an ORM or a generated create table does not get the safe default.

The owner sees everything. In PostgreSQL, “table owners normally bypass row security as well” (unless you use FORCE ROW LEVEL SECURITY), and superusers and roles with BYPASSRLS always do. If you test your app’s queries as the owner or with the secret key, every row shows up and everything looks fine.

Check your own project

Only for databases you own or run. Three places to look:

  1. Supabase Security Advisor (Dashboard → Advisors, or supabase db advisors in the CLI). Its lints include rls_disabled_in_public (level ERROR, “Table publicly accessible”) and permissive_rls_policy (WARN, a policy with an always-true condition such as USING (true)), per the advisors docs.
  2. Lovable’s security scan. According to Lovable’s security docs, the Quick scan runs on every publish and checks for “tables without per-record access control (row-level security), access rules that let everyone through”, and workspace admins can block publishing with critical findings.
  3. Ask PostgreSQL directly, using the pg_tables and pg_policies catalog views:
-- 1) tables in the public schema with row security OFF
select schemaname, tablename
from pg_tables
where schemaname = 'public' and not rowsecurity;

-- 2) policies whose condition is simply "true"
select tablename, policyname, roles, cmd
from pg_policies
where schemaname = 'public' and (qual = 'true' or with_check = 'true');

The second query lists candidates, not bugs: a true policy is right for data that is meant to be public. A person decides.

The fix

Following Supabase’s documented procedure:

alter table public.messages enable row level security;

-- take away what the browser roles never needed, then grant back the minimum
revoke all on table public.messages from anon, authenticated;
grant select, insert on table public.messages to authenticated;

-- one policy per operation, tied to the signed-in user
create policy "read own messages" on public.messages
  for select to authenticated using ((select auth.uid()) = user_id);
create policy "write own messages" on public.messages
  for insert to authenticated with check ((select auth.uid()) = user_id);

Then test as a stranger: signed out, and signed in as a different user, never only as the owner. Remember that views bypass RLS by default because they usually run as their creator, and keep the secret key on the server.

What the 30% does and doesn’t mean

The report lists its own limits, and they matter:

  • Email addresses are a proxy. Some are public contact addresses or test data; on the other hand, personal records without an email were missed. The researchers “could not establish” how much these offset each other. “The 30% figure should therefore not be read as a confirmed data leak rate.”
  • It is 30% of the 24,664 sites examined closely, not of all Lovable apps. Against all 159,041 projects found, 7,403 is 4.7%, and that is not a leak rate either.
  • The sample is not representative of all Lovable applications, because it comes from what Common Crawl happened to archive.
  • Only Supabase was examined, not Lovable’s own newer database features.

Not new, and not only Lovable

The same pattern was reported before. CVE-2025-48757, published in May 2025, describes “an insufficient database Row-Level Security policy in Lovable” and is marked as disputed: Lovable’s position is that each customer accepts responsibility for protecting their application’s data. The researcher’s write-up (Matt Palmer, then at Replit, a Lovable competitor) counted 170 of 1,645 analyzed projects with inadequate RLS in March 2025.

On 10 November 2026, before the report spread, Lovable’s head of security wrote on the company blog that “the most common issue we see in Lovable apps is data access rules that are too open”, and pointed to the publish-time scan and the option to block publishing with critical findings. As reported by Cybernews, Lovable responded to the findings by calling it a known, industry-wide configuration problem around the use of Supabase; I could not find a primary statement on the report itself. Supabase’s docs say the platform default is changing so that new tables are no longer granted to the API roles automatically, making “exposure opt-in”.

The report’s own conclusion fits any stack: “Access control mistakes can happen in any application, whether written by people or built with AI”, and “automated checks are no substitute for a professional security assessment.”

The short version: the key is public, the lock is the policy. If you run a Supabase-backed app, the two queries above take a couple of minutes.