All posts

Supabase’s October 30 change: what it fixes, and what it doesn’t.

From 30 October, new Supabase tables in public aren’t exposed to the Data API by default. Existing tables keep their grants, so here’s how to check yours.

Published
Reading time
8 min
By
Girish Babu GV

What changes on 30 October#

Until now, a table created in the public schema of a Supabase project picked up Postgres default privileges that granted access to the anon, authenticated and service_role roles. In practice that meant a new table was reachable through the Data API the moment it existed, and row level security (RLS) was the only thing deciding what a caller could see. Supabase’s changelog entry, published on 28 April 2026, reverses that default: new public tables are not exposed until you grant access yourself.

The rollout, from Supabase’s changelog
DateWhat happened
28 April 2026Announced. New projects get an “Automatically expose new tables” checkbox at creation.
18 May 2026pg_graphql is no longer enabled by default.
30 May 2026The new behaviour becomes the default for all new projects.
30 October 2026The change is applied to all existing projects.

After the change, querying a table that has no grant returns a Postgres permission-denied error, code 42501, and the changelog says the response includes a hint with the GRANT you need. The changelog recommends granting, enabling RLS and writing policies together whenever you create a table:

Supabase’s recommended setup for a new table
grant select on public.your_table to anon;
grant select, insert, update, delete on public.your_table to authenticated;
grant select, insert, update, delete on public.your_table to service_role;

alter table public.your_table enable row level security;

Only grant anon what a signed-out visitor genuinely needs. Many tables shouldn’t have an anon grant at all.

What it doesn’t change#

The changelog and the staff replies in the GitHub discussion are clear about the limits.

  • Existing tables keep their grants. A Supabase engineer confirmed in the discussion in July that grants on existing tables won’t be silently revoked on 30 October. This is the part to take seriously: the change protects tables you create from now on, not the ones you already have.
  • RLS behaves exactly as before. Grants decide whether a role can touch a table at all. RLS decides which rows it sees. A table with a grant and no RLS is still fully readable.
  • Other schemas are untouched. storage, auth, realtime and any custom schema you expose keep their current grants and defaults.
  • Direct Postgres connections aren’t affected. psql, ORMs and app servers using a connection string work as they did.
  • Functions aren’t covered. Asked about it in August, a Supabase engineer said the default EXECUTE privilege that Postgres gives to PUBLIC on functions is deliberately not handled by this change, because revoking it schema-wide would affect every Postgres client. Functions you expose as RPC endpoints are as callable as they were.

Where it can bite: migrations

A Supabase engineer explained in the discussion that the change only alters default privileges. Tables created by migrations you already ran are left as they are, but every future create table needs its own grant statements in the migration. The Supabase CLI’s temporary auto_expose_new_tables setting in config.toml, which let you reproduce the new behaviour locally, is scheduled for removal on the same date. Community members (not staff) also reported that replaying old migrations on a fresh project or a branch can leave tables without grants, so test a clean reset before you rely on one. A community reply on 29 October adds a Postgres detail worth knowing: alter default privileges only applies to tables created by the role it names, so tables created by another role follow that role’s defaults.

Why it matters: 16,000 open databases#

UpGuard’s research looked at around 300,000 domains showing signs of Supabase use and identified 16,326 databases exposing readable tables. UpGuard says over half had indicators of personal data, a smaller share held passwords or authentication tokens, and a very small number had plausible card data. It also notes that its probe looked for a users table, which skews the results toward personal data.

UpGuard describes three causes: databases with no control stopping any user from querying them, policies that exist but don’t restrict enough, and public keys in client-side code treated as if they were secret. It also points out that Supabase turns RLS on by default for tables created in the dashboard’s Table Editor, but not for tables created through the API, which is how AI coding agents tend to create them.

TechCrunch reported the research on 25 September. Supabase’s chief information security officer told TechCrunch the company hadn’t seen it, described its projects as secure by default, and called security a shared responsibility between Supabase’s defaults and tooling and how customers configure their projects.

How to check your project#

  1. Open the Security Advisor in the dashboard. The changelog says it flags the affected tables in each project and shows the SQL to fix them until 30 October.
  2. Look at the Data API badge in the Table Editor, which shows whether each table is exposed.
  3. Ask Postgres directly. The two queries below are plain Postgres catalog queries, not from Supabase’s post. Run them in the SQL editor. The first lists every table in public, whether RLS is on, and whether anon or authenticated can read it. Any row where rls_enabled is false and anon_can_select is true is readable by anyone who has your public key.
Which public tables can anon read, and is RLS on?
select c.relname as table_name,
       c.relrowsecurity as rls_enabled,
       has_table_privilege('anon', c.oid, 'select') as anon_can_select,
       has_table_privilege('authenticated', c.oid, 'select') as authenticated_can_select
from pg_class c
join pg_namespace n on n.oid = c.relnamespace
where n.nspname = 'public' and c.relkind in ('r', 'p')
order by rls_enabled, table_name;
What will a new public table get by default?
select a.defaclrole::regrole as owner,
       a.defaclobjtype as object_type,
       a.defaclacl as default_grants
from pg_default_acl a
join pg_namespace n on n.oid = a.defaclnamespace
where n.nspname = 'public';

Look for rows owned by postgres with object type r (tables) whose default grants include anon, authenticated or service_role. Those are the defaults the 30 October change removes. If they’re still there after the rollout reaches your project, ask Supabase support.

What to do before and after#

  1. Fix today’s exposure first. For every table the first query flags, enable RLS and write policies, or revoke the anon grant if signed-out visitors shouldn’t reach it at all. This is the part 30 October won’t do for you. The changelog gives revoke all on table public.your_table from anon, authenticated, service_role; for locking down an existing table completely, after which you grant back only what each role needs.
  2. Add grants to your migrations. Every new create table in public needs GRANT statements next to it, and RLS enabled in the same migration.
  3. Watch for 42501 errors after the change. A new feature that suddenly returns “permission denied” from the Data API is missing a grant, not broken RLS.
  4. Review your functions. They keep their default EXECUTE grant, so check that any function callable over RPC does its own authorisation.
  5. Opt in early if you want. The changelog gives SQL that revokes the default privileges on public now, so you can test before the deadline.
Opt in now (from Supabase’s changelog)
alter default privileges for role postgres in schema public
  revoke select, insert, update, delete on tables from anon, authenticated, service_role;
alter default privileges for role postgres in schema public
  revoke usage, select on sequences from anon, authenticated, service_role;

My take#

My own opinion, not from any of the sources.

  • It’s the right default, and it’s only half the job. “Exposed unless you remember to lock it” has been the root of a lot of these leaks. Flipping it to “closed unless you open it” is sensible, but because existing grants stay, a project that leaks today still leaks on 31 October.
  • Your public key really is public. I work with Supabase, and the mental model that helps most is to assume anyone can call your Data API with your anon key, because anyone can. Grants and RLS are the only things between that key and your data.
  • If an AI agent writes your migrations, read them. UpGuard’s point about tables created through the API not getting RLS by default is exactly the path an agent takes. Ask for the grant and the RLS statement in the same migration, and check they are there.

Sources#

Keep reading

Esc