ai newsDi., 1. Dez.

Can one customer of your AI-built app see another customer's data

You build a small app for teams. Each company signs up and sees its own projects, invoices and users. Your AI builder wrote the queries. Everything looks right in your own test account. Then a customer from Company B sends a request that names a project id from Company A, and the app answers with t

dev.toSonntag 06:49 · 29.11.2 Min. Lesezeit
Bild: dev.to

You build a small app for teams. Each company signs up and sees its own projects, invoices and users. Your AI builder wrote the queries. Everything looks right in your own test account.

Then a customer from Company B sends a request that names a project id from Company A, and the app answers with the data.

Apps with many customers (called multi-tenant apps) need every query to say "only rows that belong to this customer". AI builders often add that filter to the main list page and forget it on the detail page, the export button, the search box or the API route behind a background job. One missing filter is enough.

If A can see anything of B's, you have found a tenant isolation bug.

"Audit every database query and API route in this project. For each one that reads or changes customer data, show me where it restricts the result to the signed-in user's organization. Take the organization id from the server-side session, not from request input. List any route that is missing the check and fix it. Then add a test that signs in as organization A and tries to read organization B's records."

An outside scan of your public pages does not sign in, so it cannot act as two customers and compare what they see. That test needs two accounts, as above. A passive scan can only tell you what a stranger sees without signing in.

I work on ProofForge. The free scan covers what a visitor can see and says plainly what it could not check.

Check your own app from the outside, free. Run the free ProofForge scan on your live URL. No account needed for the first scan. It looks at your public site the way a stranger would and says pass, fail or inconclusive, so you know what is confirmed and what it could not see. One-time reports start at $9: see pricing. Building with an AI agent? There is an MCP server so it can check before it deploys.

Quelle: dev.to (dev.to). Original öffnen