Notes

Can your customers read each other’s data?

2 min read

A Supabase publishable key can go in browser code. To check this, I’d use two test customers with a private booking each. A signed-out visitor should see neither booking, and each customer should see only their own.

In January 2026, researchers at Wiz looked at a new social network called Moltbook and found its database key in the browser code. Wiz reported that row level security was off, so anyone with that public key could read and write every table. The exposed data included 1.5 million API tokens, 35,000 email addresses and 4,060 private conversations.

Moltbook used Supabase. Its publishable key is like the street-door key of a block of flats. Even a signed-out visitor has one. Each flat still needs a lock that works.

Supabase calls the lock on each flat row level security, or RLS. Table permissions decide whether a visitor or a customer can read a table at all. With RLS on, its policies limit which rows they can read.

Supabase turns RLS on for tables created in its Table Editor. If a table was created with SQL or another tool, check whether RLS is on now. If RLS is on and no policy lets a customer read their bookings, the query returns no rows and the app may show an empty screen. Turning RLS off brings the bookings back for everyone with read access to the table.

Use a separate test project with the same tables, permissions and policies as your app.

  1. Open Database, then Policies. For each table, check that RLS is on and who each policy lets read or change rows. A read policy for visitors with the condition true lets them read every row. Adding a narrower permissive policy still leaves every row readable. A restrictive policy can filter those rows.
  2. Sign up two test customers and create one private booking for each with made-up details. In the Table Editor’s role selector, choose anon, a visitor who hasn’t logged in. Clear any filters and look for both bookings. Neither should be there. An error saying anon may not read the table also counts as blocked. With any other error, you still don’t know whether a visitor can read the bookings.
  3. Choose authenticated and the first customer. Their own booking should be there and the other’s hidden. Repeat as the second customer.

If the app reads bookings through a server, a database function or a view, repeat the check through that route as the visitor and as each customer.

Creating, changing and deleting need their own checks.

Supabase secret keys and older service_role keys bypass RLS, so they belong on the server. Another note shows how to search your site’s code for private keys.

If customers’ bookings are exposed, restrict access to them straight away. Fix the exposed path in the test project, repeat the checks, then check the deployed fix with test bookings.

If you’d like to talk through who can read what in your app, you can book a free hour with me.

  • ai-built
  • vibe-coding
  • security
  • database

Menu

Go to
Book a Clarity Call /book-call
Book a coworking desk in Djerba /book-desk
Home /
Principles /#principles
Services /services
About and resume /about
Notes /notes
Now /now
Contact /contact
Notes
Why AI-built websites all look the same /notes
Three cards in a row /notes
One italic word in the headline /notes
An arrow on every button /notes
Sections that fade in as you scroll /notes
Elsewhere
LinkedIn linkedin.com
RSS feed /rss.xml
Privacy /privacy
Language
Français /fr/notes/can-customers-read-each-others-data
العربية /ar/notes/can-customers-read-each-others-data
Display
Switch to light theme theme