Firebase and Supabase Misconfiguration: How Apps Leak Their Whole Database

How misconfigured Firebase security rules and Supabase row level security expose entire databases, how to check yours, and how to fix it.

Yrzo AI28 November 2026 3 min read

Why these leaks are so common

Firebase and Supabase let front-end apps talk directly to the database. That is what makes them fast to build with — and why one wrong setting can expose everything. The app's public key is meant to be public; the protection comes from security rules (Firebase) or row level security policies (Supabase). If those are missing or too permissive, anyone with the public key can read or write any record.

How the leak happens

Firebase

Test-mode rules such as allow read, write: if true; are often left in place after launch. Others check only that a user is signed in (request.auth != null), which means any signed-up user can read every other user's data.

Supabase

Tables created without row level security enabled are readable and writable by anyone with the anon key. Policies that use true or forget to compare auth.uid() to the row's owner have the same effect.

What attackers do with it

Automated tools find public project IDs and keys in JavaScript bundles, then try to list collections and tables. Exposed data has included customer emails, addresses, chat messages, order histories and admin flags — sometimes with write access, so an attacker can make themselves an admin.

Is your site exposed to this?

Run a free, non-intrusive check of what attackers can see from outside. No account needed.

How to check your app

  1. Review every rule or policy. Every collection or table should have an explicit rule. No if true, no table without RLS.
  2. Test as a stranger. Using only the public key, try to read a table you should not see.
  3. Test as another user. Sign up a second account and try to read the first account's records by ID. See IDOR.
  4. Check write paths. Can a user change their own role or is_admin field? See mass assignment.
  5. Check storage buckets for public listing and overly broad upload rules.

How to fix it

  • Deny by default, then allow specific access per collection or table.
  • Tie every read and write to the owner: auth.uid() = user_id (Supabase) or request.auth.uid == resource.data.ownerId (Firebase).
  • Move privileged operations (role changes, payments, admin actions) into server functions using the service role, never the client.
  • Keep the service role key on the server only — see API keys exposed in JavaScript.

AI-built apps are especially at risk

Apps generated quickly with AI builders often use these backends and may ship with permissive defaults. See vibe coding security.

Get it tested

Yrzo AI checks for exposed keys, open data access and access-control gaps in apps built on these platforms. Run a free scan or see the Professional report.

Related reading: Vibe Coding Security: Risks in AI-Built Apps and How to Fix Them · API Keys Exposed in JavaScript: How to Find and Fix Them · React App Security Checklist: Front-End Risks That Matter

Firebase security rules misconfigurationSupabase RLS securityexposed Firebase databasebackend as a service security
Share

Check your own website in 60 seconds

Free check, no account needed. Want the full picture? Full reports start at £149, with up to 110 checks with a 14-day money-back guarantee.

Keep reading