{"slug": "can-one-user-see-another-user-s-data-in-your-ai-built-app-the-two-account-test", "title": "Can one user see another user's data in your AI-built app? The two-account test for Supabase, Firebase and custom APIs", "summary": "ProofForge released a free two-account test that checks whether one user can read another user's data in Supabase projects, targeting broken access control and IDOR bugs common in AI-built apps. The tool takes a project URL, private tables and the owner column, then generates a read-only script that runs locally with two throwaway accounts, returning zero rows as the pass condition. ProofForge notes the test does not cover writes, deletes or storage, and that outside scans cannot detect cross-user data exposure.", "body_md": "You can log in to your app, see your own data, and everything looks right. That tells you nothing about whether a second user can see yours.\n\nThis is called broken access control, or IDOR (insecure direct object reference) when it happens through an ID in a request. It is one of the most common serious bugs in apps built quickly with AI tools, because the app works fine for the one person testing it.\n\nA scanner that checks your public site sees what a visitor sees: JavaScript, headers, public files. Whether user B can read user A's orders depends on your database policies and your server checks, and those only show up when two real accounts are used. Anyone who tells you a scan of a URL proves your users are separated is guessing.\n\nYou need two test accounts, A and B. Use throwaway emails, and do this on a staging copy if you can.\n\nIf B or a signed-out visitor gets A's data, you have the bug.\n\nWith Supabase, the browser talks to your database directly using the anon key. That is normal. What protects the data is row level security (RLS). Check these:\n\n`user_id = auth.uid()`.` using (true)` on a table that holds private rows.\nThe test for Supabase: sign in as B and run `select` on A's rows with the Supabase client. You should get zero rows back, not A's data.\n\nOpen your Firestore and Storage rules. `allow read, write: if true;` means everyone. A safe rule ties access to `request.auth.uid` matching the owner field of the document.\n\nDo not trust an ID sent by the browser. On the server, take the user from the session, then look up the record with both the ID and that user. If the record does not belong to the user, return 404.\n\nProofForge has a free two-account test for Supabase projects: you enter your project URL, your private tables and the owner column, and it builds a read-only script in your browser. You run it on your own computer with two throwaway test accounts. No keys or passwords go into the form, and it never reports an unclear result as a pass. It only reads, and signing in as test users can write to your authentication logs. It does not test writes, deletes or storage. [https://proofforge.live/two-account-test](https://proofforge.live/two-account-test)\n\n| Question | Outside scan | Two-account test | \n|---|---|---|\n| Keys in public JavaScript | Yes | No | \n| Public tables open to everyone | Yes | Partly | \n| User B reading user A's rows | No | Yes | \n| Server-side logic bugs | No | No | \n\nUse both. The outside scan is free at [https://proofforge.live](https://proofforge.live). Neither replaces a code review.", "url": "https://wpnews.pro/news/can-one-user-see-another-user-s-data-in-your-ai-built-app-the-two-account-test", "canonical_source": "https://dev.to/proofforge_live/can-one-user-see-another-users-data-in-your-ai-built-app-the-two-account-test-for-supabase-1bh1", "published_at": "2026-11-28 02:04:18+00:00", "updated_at": "2026-11-28 02:14:20.000051+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "ai-agents"], "entities": ["ProofForge", "Supabase", "Firebase"], "also_reported_by": [], "takeaway": "A URL scan cannot prove user isolation; sign in as a second throwaway account and query the first user's rows, expecting zero results under Supabase row level security.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/can-one-user-see-another-user-s-data-in-your-ai-built-app-the-two-account-test", "markdown": "https://wpnews.pro/news/can-one-user-see-another-user-s-data-in-your-ai-built-app-the-two-account-test.md", "text": "https://wpnews.pro/news/can-one-user-see-another-user-s-data-in-your-ai-built-app-the-two-account-test.txt", "jsonld": "https://wpnews.pro/news/can-one-user-see-another-user-s-data-in-your-ai-built-app-the-two-account-test.jsonld"}}