# Can strangers see your users' emails? Supabase profiles tables and auth.users views, checked in five minutes

You built a sign-up flow with Lovable, Bolt or Cursor. People are registering. Then a worry sets in: can a stranger pull the list of your users' emails, names or phone numbers out of your Supabase project?

For most apps it comes down to one table and one decision: where the user data lives, and whether that table is protected. This is how to check in about five minutes, what Supabase's docs say about the two ways it commonly leaks, and the fix.

## Where your users' data actually lives

When someone signs up, Supabase Auth stores them in `auth.users`. That table holds sign-in details and personal information. Supabase's docs say that "for security, the Auth schema is not exposed in the auto-generated API." So a stranger can't call `auth.users` directly.

Apps that need user data on screen, like a name or avatar, create their own table in the `public` schema, usually called `profiles`. That's where exposure happens, because anything in `public` is reachable through the API. Supabase's own guidance for that table: "Make sure to protect the table by enabling Row Level Security and only granting the necessary privileges for each role."

There are two common ways user data ends up public.

## Leak 1: the profiles table is open

Your public table has RLS off, or a policy that says `using (true)`, and it holds emails, phone numbers, or anything else you wouldn't post on a billboard. Supabase's RLS guide: "A table in an exposed schema without RLS is readable and writable by any role with a grant on it."

Two things make this easy to miss:
- AI builders often copy the pattern "profiles are viewable by everyone," which is a real example in Supabase's docs for tables that only hold public fields like a username. It's fine for a username. It's a leak when the same table also holds `email` or `phone`.
- Supabase's docs note that on existing projects, new tables in `public` start with every privilege granted to `anon` and `authenticated`, and policies don't take grants back.

## Leak 2: a view over auth.users

To show a name or email in your app, a builder sometimes creates a view that selects from `auth.users` and puts it in `public`. Supabase's Security Advisor treats this as an **ERROR**-level finding, "auth_users_exposed" (lint 0002), with the ramification: "A view is exposing your users' personal information to anyone who can access your API."

The reason, from the lint's docs: Postgres views are "security definer" by default, which means they don't respect the RLS rules of the tables in the view. So "a `public` security definer view referencing `auth.users` exposes all user records to all API users."

A related finding, `security_definer_view` (lint 0010), is also ERROR-level for any public view that runs with its creator's privileges and ignores RLS.

## Check it yourself: five minutes, read-only

Do this on your own project only. Your Supabase URL and public (anon or publishable) key are in your site's JavaScript. That part is normal.

**1. Ask the API as a stranger.** From a terminal, request a single row from your profiles table with only the public key:

```bash
curl -s "https://YOUR-PROJECT.supabase.co/rest/v1/profiles?select=id&limit=1" \
  -H "apikey: YOUR_PUBLIC_KEY" -H "Authorization: Bearer YOUR_PUBLIC_KEY"
```

If you get back a row, a stranger can read that table. An empty list `[]` doesn't prove it's safe: the table might simply be empty, or RLS may be filtering. An error or a permissions message is what you want to see. Then repeat it for every table that holds user information.

**2. Look for views.** In the SQL editor:

```sql
select schemaname, viewname from pg_views where schemaname = 'public';
select schemaname, matviewname from pg_matviews where schemaname = 'public';
```

Open each one and check whether it references `auth.users`. Also open the Security Advisor and look for `auth_users_exposed` and `security_definer_view`.

**3. List which tables lack RLS or have open policies:**

```sql
select tablename from pg_tables where schemaname = 'public' and not rowsecurity;
select tablename, policyname, roles, cmd, qual from pg_policies
where schemaname = 'public' and qual = 'true';
```

## The fix

**If the table is open:** enable RLS and write policies that only let a user read their own row.

```sql
alter table public.profiles enable row level security;

create policy "users read own profile" on public.profiles
for select to authenticated
using ( (select auth.uid()) = id );
```

If the table holds both public and private fields, split it. Keep a small `public_profiles` table with only what's meant to be visible (username, avatar) and move email and phone to a table only the owner can read.

**If it's a view:** Supabase's fix for `security_definer_view` is to create the view with `security_invoker`, so it runs with the caller's privileges and respects RLS:

```sql
create view public.order_items
  with (security_invoker=on)
  as select ... ;
```

For exposing user data, Supabase recommends instead the trigger approach: a `public.profiles` table with only the columns your app needs, filled by a trigger on `auth.users`. The docs add a caution that triggers run in the same transaction, so "any errors could block user signups," and say to test the logic carefully.

**Then rotate if needed.** If you find the table was open for a while, check your Supabase logs for bulk reads. Log retention is 1 day on Free, 7 on Pro, 28 on Team. If a `service_role` key was ever in your JavaScript or repo, rotate it: https://proofforge.live/fix/service-role-key-exposed

## What a scan can and can't tell you

The "read as a stranger" check is exactly what an outside scan does, which makes it a good independent test. ProofForge's free scan runs against your live URL with no login and never reads row values. It can show which tables an anonymous visitor can reach, plus secret keys in the bundle, exposed files and missing headers: https://proofforge.live

It can't see policies that depend on a signed-in user, such as whether user B can read user A's profile. Use the two-account test for that: https://proofforge.live/two-account-test. For a by-hand check of every table: https://proofforge.live/tools/supabase-rls-checker. More on the open-table cases: https://proofforge.live/fix/supabase-rls-disabled and https://proofforge.live/fix/supabase-rls-using-true.

## The $9 part

The free scan shows your grade, every finding's severity and impact, and the top fix in full. **$9 once** unlocks every finding with exact code fixes and prompts for your builder, so splitting a table or rewriting a policy is one precise prompt rather than several rounds of credits. **Fix + Guard ($29 once)** adds deploy-hook rescans for 30 days. There's a 14-day refund and no subscription: https://proofforge.live/pricing

*Sources, checked December 1, 2026:*
- *Supabase docs, "User Management" (auth schema not exposed; profiles pattern), supabase.com/docs/guides/auth/managing-user-data*
- *Supabase docs, "Row Level Security," supabase.com/docs/guides/database/postgres/row-level-security*
- *Supabase docs, Advisors: lints 0002 auth_users_exposed and 0010 security_definer_view, supabase.com/docs/guides/database/database-linter*
- *Supabase docs, "Logs in Studio" (retention by plan), supabase.com/docs/guides/observability/logs*
- *ProofForge tiers, proofforge.live/pricing.json*
