Skip to content

1 in 4 open-source Supabase apps leaves a table open

View as MarkdownOpen in ClaudeOpen in ChatGPTOpen in Perplexity

The question is copied too. If the chat opens empty, paste it.

On this page
  1. How did I test 568 projects?
  2. What did I find?
    1. Tables nobody turned RLS on for
    2. Policies that say true
    3. Views that skip RLS
  3. Are Lovable projects worse?
  4. Does the 30 October change fix this?
  5. How did I make sure the numbers are right?
  6. What this study cannot see
  7. How do you check your own project?
  8. My similar case
  9. Sources

TL;DR

I took 1,170 public GitHub repositories that keep Supabase migrations, applied each one to a fresh Supabase database in an offline sandbox, and ran the same 15 database rules my free checker runs on live projects. 568 projects applied cleanly: 15,624 tables in public. 134 of them (23.6%) have at least one table with RLS off that the public key can read and change. 8.8% have a policy that lets a signed-out visitor update or delete any row, 10.9% let them insert anything, and 12.0% expose a view that skips RLS. Lovable projects leave fewer tables without RLS (9.1%) but write true into policies two to three times as often. On a project created after Supabase’s 30 October change, the same migrations leave 3.6% open instead of 22.7%. Three SQL queries at the end show where your own project stands.

Most Supabase security advice says the same thing: turn on RLS, write policies, check the Advisor. I wanted to know how often real projects actually get this wrong, measured the same way every time, not from the handful of apps people post on Reddit. Public GitHub has thousands of Supabase projects with their full migration history, so I built every one I could and looked at the database the migrations leave behind.

How did I test 568 projects?

I searched GitHub for SQL files under supabase/migrations that contain create table, sliced by file size to get past the search limit. That gave 8,914 repositories, forks excluded. From those I took a fixed pseudo-random sample, ordered by a hash of the repository name, and downloaded only the migration folder and package.json of each.

Step Projects
Repositories with Supabase migrations (GitHub code search, 7 November 2026) 8,914
Downloaded sample 1,170
Measured, after removing exact duplicates 1,168
Templates and Supabase’s own repositories removed 9
Migrations that stop with an error on a fresh database 567
No tables in public 8
Use Supabase’s automatic RLS trigger (excluded, see limits) 16
Analysed 568

Each project ran in its own fresh database inside a Docker container with no network access, built from a dump of a local Supabase stack (CLI 2.109.1, Postgres 17.6, with the real auth and storage schemas). Migrations ran in file-name order as the postgres role, which is not a superuser on Supabase, the role supabase db push uses too. Nothing from a repository ever ran outside that container.

On the resulting database I ran the catalog queries and the 15 database rules of my Supabase security checker, unchanged. Settings that live outside the database, such as email confirmation or leaked-password protection, cannot be seen from migrations, so those rules are left out.

Almost half the projects stop with an error before the last migration. The usual causes are seed data that points at users who exist only in the author’s project, objects created by hand in the dashboard and referenced later, and migrations that never worked on a clean database. I report only the projects that applied cleanly.

What did I find?

568 open-source Supabase projects: share with each finding. Percent of projects. Migrations applied to a fresh database, November 2026. RLS off, open to the public key: 23.60; View that skips RLS: 12; Anyone can insert anything: 10.90; Sensitive column reachable: 10; Anyone can update or delete any row: 8.80; Storage open to signed-out users: 5.30; Policy trusts user_metadata: 0.70.
Source: my study of 1,168 public GitHub repositories with Supabase migrations, 568 of them applied cleanly, 7-8 November 2026.
Finding All (568) Lovable (66) Other (502)
At least one table with RLS off that the public key can read and change 23.6% 9.1% 25.5%
A policy lets signed-out visitors update or delete any row (using (true)) 8.8% 15.2% 8.0%
A policy lets signed-out visitors insert anything (with check (true)) 10.9% 28.8% 8.6%
A view in public that skips the RLS of its tables 12.0% 7.6% 12.5%
A storage policy open to signed-out visitors 5.3% 12.1% 4.4%
A column with a sensitive-looking name reachable through the API 10.0% 16.7% 9.2%
A policy that trusts user_metadata 0.7% 0% 0.8%

Across all 15,624 tables, 8.5% have RLS off. That sounds small until you count per project: one in four apps has at least one such table, and with the default grants Supabase used until 30 October 2026, the public key can read and write every row of it.

Tables nobody turned RLS on for

In each of the five projects I opened by hand, no migration ever ran alter table … enable row level security on the open table. One project had 31 tables and RLS on none of them. What these tables hold varies: reference lists like countries, but also counters, events, sales and profiles. The RLS disabled in public note explains what the Advisor warning means and how to close it without breaking the app.

Policies that say true

A policy with using (true) on update or delete means any visitor with your public key can change or remove every row. 8.8% of projects have at least one. with check (true) on insert is more common, 10.9%, and is sometimes deliberate, for a waitlist or a contact form. I counted only the literal true: a policy that calls a helper function such as is_member(team_id) is guarded inside the function, so it is not in these numbers. The using (true) note shows how to tell the deliberate case from the accident.

Views that skip RLS

A view in public runs with the rights of its owner unless it is created with security_invoker = true, so it returns rows that the table’s own policies would hide. 12.0% of projects have at least one.

Are Lovable projects worse?

Not in the way I expected. I counted a project as a Lovable project when its package.json lists lovable-tagger or at least half of its migration files carry Lovable’s <timestamp>_<uuid>.sql names. Those projects leave fewer tables without RLS, 9.1% against 25.5%. They write true into policies far more often: 15.2% let anyone update or delete rows, 28.8% let anyone insert, and 12.1% open a storage policy to signed-out visitors. Only 66 Lovable projects applied cleanly, while 152 stopped with an error, often on seed data for the author’s own users, so treat the Lovable column as a direction, with a margin of about eight points either way.

Does the 30 October change fix this?

Supabase’s breaking change stops giving new tables in public automatic grants for the API roles; I tested what it breaks in this post. I ran 433 of the projects a second time with the new defaults, the way a project created after the switch starts. 194 of them applied cleanly both times.

Same 194 projects Old defaults New defaults
At least one table with RLS off that the public key can read and change 44 (22.7%) 7 (3.6%)
The same 194 projects before and after 30 October. Percent with a table that has RLS off and that the public key can read and change. Old default privileges: 22.70; New default privileges: 3.60.
Source: my study, November 2026: the same migrations applied with the old and the new Supabase default privileges.

So yes, for new tables it closes most of the gap: a table nobody granted is unreachable, RLS or not. The seven projects that stay open grant the API roles access themselves in their migrations, which brings the old exposure straight back. And the switch only changes what new tables get: a project that already has an open table keeps it open, so the first query below still matters on every existing project.

How did I make sure the numbers are right?

Before trusting any result, I built a test project with six planted problems (a table with RLS off, using (true) policies, a view without security_invoker, a security definer function anyone can call, a policy reading user_metadata, a public bucket with anonymous uploads) and two correctly secured tables. The pipeline had to find all six and neither of the two. The first runs did not: the rules need the list of API schemas, which a live project provides and a sandbox does not, and the sandbox’s admin role printed uid() instead of auth.uid() in policies, which made safe policies look open. Both are fixed, every project was measured again, and I opened samples of each finding by hand.

What this study cannot see

  • Migrations are not the live database. Anything changed in the dashboard and never written to a migration is invisible here, in both directions.
  • Projects that publish their migrations on GitHub are not all Supabase projects. Many are learning projects and side projects.
  • Nearly half the sample did not apply cleanly and is not in the numbers. Those projects could be safer or less safe.
  • Projects that turned on Supabase’s automatic RLS trigger get RLS on new tables without any migration saying so. I excluded the 16 that reference it; others may use it without a trace in their files.
  • Repository names are not published. The data comes from public, non-personal information under the research clause of GitHub’s Acceptable Use Policies.

How do you check your own project?

Run these in the SQL Editor. Each one returned exactly the planted problem on my test project and nothing else.

Tables with RLS off, and whether the public key can reach them:

select c.relname as table_name,
       has_table_privilege('anon', c.oid, 'select') as anon_can_read,
       has_table_privilege('anon', c.oid, 'insert,update,delete') as anon_can_write
from pg_class c
join pg_namespace n on n.oid = c.relnamespace
where n.nspname = 'public' and c.relkind in ('r', 'p') and not c.relrowsecurity
order by 1;

Policies that let signed-out visitors write without any condition:

select tablename, policyname, cmd, roles
from pg_policies
where schemaname = 'public'
  and cmd in ('INSERT', 'UPDATE', 'DELETE', 'ALL')
  and roles && array['anon', 'public']::name[]
  and (qual = 'true' or with_check = 'true')
order by 1, 2;

Views that skip RLS:

select c.relname as view_name
from pg_class c
join pg_namespace n on n.oid = c.relnamespace
where n.nspname = 'public' and c.relkind = 'v'
  and not exists (
    select 1 from unnest(coalesce(c.reloptions, '{}')) as o
    where o ~* '^security_invoker=(true|on|yes|1)$'
  )
order by 1;

An empty result on all three is a good start, not a clean bill of health. How to enable RLS covers the first query, RLS policy examples the second, and how to test RLS shows how to prove that one user cannot read another’s rows. For the wider picture, see is Supabase secure and the Lovable security checklist.

My similar case

Building a time tracker for an audit firm, I found 4 errors no screen showed, including a confidential client leaking through report totals and tag counts. Every access rule now lives in the database and is tested before each deploy; the full story is in the audit firm case.

Want to know where your own project stands? Write to me and we’ll check it the same way.

Where does your project stand?

Tell me what you have now and what you need. I'll reply with the option I'd pick.

Write to me

Sources

© 2026 Denys Zaichenko. Original article: https://madsalt.tech/blog/open-source-supabase-projects-security-study/