Skip to content
AI-powered appsNewChat, vision, voice, generationBookings & schedulingAppointments that book themselvesShops & sellingA storefront in every pocketClient & businessRun the operation from one placeCommunities & clubsA home that is not a group chat
Health & wellnessHabits, tracking and calmGames2D, 3D and multiplayerPersonal & toolsThe tool you wish existedInternal toolsThe tool ops never had time for
See all use cases
ArcadeNewPricingSecurity
EngineThe game engine and World EditorHow it worksFrom one sentence to a live productDocsGuides for building and publishingBlogStories, guides and newsChangelogWhat shipped latelyStatusUptime of every serviceSupportGet help from the team
AI-powered appsBookings & schedulingShops & sellingClient & businessCommunities & clubsHealth & wellnessGamesPersonal & toolsInternal tools
See all use cases
ArcadeNewPricingSecurity
EngineHow it worksDocsBlogChangelogStatusSupport
Language
Blog
TroubleshootingNovember 22, 20266 min read

Users can see each other's data: fix it now

When users see each other's data, the database is not enforcing who owns what. Contain first, then fix the access rules, check what was exposed and decide who to tell.

Startbase Team
Editorial ink illustration of a hotel front desk key wall with a master key ring hanging open, the ring in ember orange

Key takeaways

  • Treat this as a security incident, not a bug. Contain it today, before you polish the fix.
  • The usual cause is a table without row-level security, or with a policy that allows everyone. Filtering in the app's code does not protect data.
  • Hiding the page is not enough: anyone with the app's public key can query the database directly until the access rules are fixed.

If one user of your app can see another user's orders, messages, files or profile details, treat it as a security incident. The most likely cause is that the database is not enforcing ownership: a table has row-level security off, or a policy that allows any signed-in user (or anyone at all) to read every row. The app may look correct because its screens filter by user, but that filtering happens in the browser, where anyone can bypass it. Work through the steps below in order, today.

Tip

Do not wait to be certain before containing. If a user reports seeing someone else's data, assume it is real until you have proven otherwise.

Step 1: contain it in the next hour

The goal is to stop new exposure, even at the cost of some features for a while.

  • Close the affected table first. The fastest real fix is usually a policy change: make the leaking table readable only by each row's owner. If you are unsure what the right policy is, a temporary policy that blocks all reads on that table is safer than leaving it open. The app's screens for that data break; the leak stops.
  • Understand what unpublishing does and does not do. Unpublishing takes your startbase.app address and custom domain offline, which stops new visitors using the app. It does not lock the database: your app's public key and API address may already be known, and they talk to the database directly. Do it if you want to, but alongside fixing the rules, not instead of it.
  • Disabling Cloud is the heavy option. Per the Startbase docs, disabling Cloud for a project stops sign-in, data and uploads in your app until you enable it again, and keeps the database and files intact. Consider it if you cannot pin down the cause quickly.
  • Make private file buckets private. If the leak involves uploads, check whether the bucket is public; anyone with a file's link can view files in a public bucket.
  • Write down the time you learned about it and what you changed. You will need this timeline later.

Step 2: find the cause, most likely first

1. Row-level security is off on the table

With RLS off, any request that carries your app's public anon key can read the whole table. How to check: the pre-publish security scan checks every table for row level security when you open Publish, and the Security section of the Backend tab runs the same advisor checks any time (missing RLS is flagged as a security finding). In the Data section, the RLS policies view shows which tables have policies. The fix: enable RLS and add owner-only policies, for example `auth.uid() = user_id` for SELECT, UPDATE and DELETE, and a WITH CHECK of the same for INSERT.

2. A policy that allows everyone

RLS is on, but a policy reads `true`, or allows the whole `authenticated` role without checking ownership. This often happens when someone was fixing a "data not showing" problem and opened the table up to make it work. How to check: read each SELECT policy's USING expression in the RLS policies view. Anything that does not mention the user (or their team membership) lets every signed-in user read every row. The fix: replace it with an ownership or membership condition.

3. The service role key is in the app

The service role key bypasses all row-level security. If it is in frontend code, anyone can read it from the browser and query everything. How to check: the publish security check looks for leaked keys, including the Supabase service role key. The fix: remove it from the frontend, and rotate it, because it must be considered exposed. Server-side code reads secrets from Backend → Secrets; keys starting with `SUPABASE_` there are managed and rotated by Startbase Cloud, so ask the agent or support how to rotate rather than guessing.

4. A server function that trusts the caller

An edge function that takes a `user_id` from the request body and returns that user's data will happily return anyone's data to anyone who changes the ID. Functions that use elevated access must check who is calling, from their session token, on every request. How to check: read each function that returns user data and ask "where does it get the user ID from?" The answer must be the verified session, never the request body. The fix: derive the user from the token, and check ownership before returning anything.

5. Shared caching or shared state

Less common, but real: a server function caches a response in memory and serves it to the next caller, or a cache layer stores per-user pages under one key. Symptoms are intermittent: users occasionally see a stranger's dashboard. The fix: never cache personalized responses under a shared key.

6. Data meant to be shared, shared too widely

Team apps need team-scoped policies: a row is visible if the user is a member of the row's team. A policy that checks "is a member of any team" instead of "is a member of this row's team" leaks across teams. The fix: join on the row's own team ID.

Step 3: verify the fix like an attacker would

  1. 01Create two test accounts, A and B, each with a few records.
  2. 02Signed in as A, try to load B's records through every screen and by changing IDs in the URL.
  3. 03Ask the agent to run the same checks directly against the API with A's session, bypassing the app's screens, for every table that holds personal data.
  4. 04Run the Security section scan again and the publish security scan, and confirm no High finding about RLS or leaked keys remains.

Step 4: work out what was exposed, and who to tell

Find out which tables were open, since when (the migration or change that opened them is in your project history and Versions), and whether anyone actually accessed data that was not theirs. The Logs section can help, but log retention is short on the free tier (about a day), so look now. Be honest with yourself about what you cannot know: if logs do not go back far enough, you may not be able to rule out access.

Whether you must notify users or a regulator depends on what data it was and where your users live. Under GDPR, for example, a personal data breach that poses a risk to people generally has to be reported to the supervisory authority within 72 hours of becoming aware of it, and affected people informed when the risk is high. Other laws have their own rules. This is a point to get proper legal advice rather than rely on a blog post; our GDPR guide for app builders covers the basics. Whatever the legal answer, a short, plain message to affected users ("what happened, what data, what we did, what you should do") preserves more trust than silence.

If you believe the cause is in Startbase itself rather than your app's rules, email security@startbase.ai with the affected feature, when the issue occurred and steps to reproduce it, leaving out passwords, API keys and unrelated personal data.

The message to send the agent

Security incident: a user reported seeing another user's invoices on the Invoices page. Treat this as urgent. Please: 1) list every table with personal data and whether row-level security is on, with each policy's USING and WITH CHECK expressions, 2) immediately make invoices, customers and messages readable and writable only by their owner (user_id = auth.uid()), 3) search the frontend for any service role key or secret and tell me if one is exposed, 4) check every edge function that returns user data takes the user from the verified session, not the request body, 5) make the uploads bucket private and switch the app to signed URLs, 6) test with two accounts that neither can read the other's rows through the app or the API, and 7) tell me when these tables were opened, based on the migrations. Do not delete any data.

Once you are out of the woods, read row-level security explained and the app security checklist, and see authentication vs authorization for why being signed in is not the same as being allowed. The security practices docs list the checks to run before every publish.

Frequently asked questions

Is it enough to filter data by user in my app's code?

No. Browser code can be read and changed by anyone, and the database can be queried directly with your app's public key. Ownership has to be enforced in the database with row-level security, or in server code that checks the session.

Does unpublishing my app stop the leak?

It takes the site offline, but it does not change who can query the database. Fix the access rules; unpublish as an extra step if you want.

Do I have to tell my users?

It depends on the data and the laws that apply to your users. Under GDPR, breaches that risk people's rights generally must be reported to the regulator within 72 hours, and to affected people if the risk is high. Get legal advice for your case.

How do I make sure it does not happen again?

Keep RLS on for every table, never open a policy to everyone to fix a display bug, keep secret keys only in server-side secrets, and test with two accounts before each publish.

On this page

  • Step 1: contain it in the next hour
  • Step 2: find the cause, most likely first
  • Step 3: verify the fix like an attacker would
  • Step 4: work out what was exposed, and who to tell
  • The message to send the agent

Keep reading

More in Troubleshooting
Editorial ink illustration of an overstuffed card catalog drawer spilling index cards, the brass tab of one card in ember orange
TroubleshootingNovember 22, 2026

Why is my app slow with lots of data?

An app that slows down as data grows almost always loads or draws too much at once. Here is how to find which part is slow and the fix for each.

6 min read
Editorial ink illustration of a border checkpoint with a lowered barrier arm and a waiting parcel, the guard's stamp in ember orange
TroubleshootingNovember 22, 2026

CORS errors explained and fixed

A CORS error means the server you called did not say your website is allowed to read its answer. The fix lives on that server, or in a server function you control.

5 min read

Read less. Ship more.

Everything in this post is one prompt away. Describe your app and watch it build.

Start building

Apps, games, backends and publishing from one conversation.

Product

  • Features
  • Use cases
  • Pricing
  • Changelog

Resources

  • Blog
  • Docs
  • Support
  • Status
  • Security

Contact

  • w@startbase.ai
  • X / Twitter
  • LinkedIn
  • Instagram

Legal

  • Terms
  • Privacy

© 2026 Startbase. All rights reserved.