Back to feed
Dev.to
Dev.to
7/5/2026
The original title is: "3 Supabase security incidents, one shared root cause: SECURITY DEFINER inherits EXECUTE TO PUBLIC"

The original title is: "3 Supabase security incidents, one shared root cause: SECURITY DEFINER inherits EXECUTE TO PUBLIC"

Original: 3 Supabase security incidents, one shared root cause: SECURITY DEFINER inherits EXECUTE TO PUBLIC

Short summary

Three Supabase security incidents exposed sensitive data to unauthenticated users because PostgreSQL implicitly grants public access at CREATE time, even when developers didn't explicitly write it. The root cause: Postgres completes table, function, and policy creation with GRANT ... TO PUBLIC. Fixes require explicit REVOKE statements and restrictive RLS policies.

  • PostgreSQL implicitly grants public access at CREATE time for tables, functions, and policies
  • Three real Supabase incidents exposed PII, unguarded endpoints, and admin functions to anonymous users
  • Fixes: explicitly REVOKE unintended grants, enable RLS, and use role-based restrictive policies by default

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more