Back to Common risks

Common risksCustomer data

The whole customer table, sent to the browser

Your UI shows one page of users. The API may have already sent every row. Open DevTools Network and the full table can be sitting in the response.

What can go wrong

Over-fetch here means the server returns an entire table (findMany(), select('*'), no filter by the signed-in user) and the frontend hides rows with JavaScript.

The browser already holds names, emails, and private messages. Dropping the auth header and replaying the same request often still works. This is row-level leakage, not changing one ID in the URL (that is IDOR).

GraphQL can mirror the same mistake: an anon key plus weak row rules can expose { usersCollection { edges { node { email } } } } even when your React list looks scoped.

It happened for real

In 2026, XDA Developers audited four real AI-built apps and found user-data leaks in three. Examples: a matchmaking site fetched every registered user on the homepage and filtered client-side ("the data was already on my machine"); a Lovable-built LinkedIn generator returned the platform's entire user database when the auth header was removed (XDA 2026).

Practitioner writeups call this "a server that returns all user data and trusts the client to filter it" (DEV bezael).

How to check yours

Seatbelt flags this automatically (partial). URL Ship Read can flag arrays of user records (multiple distinct emails) embedded in served page source. Repo scans catch bare model returns and some field-level over-fetch.

Honest holes: we do not yet statically prove every findMany() without a session-scoped where in your source. GraphQL over-fetch on a live URL is noted when we see the surface, not fully probed.

Ask your agent: "List every API route that returns user, profile, or order lists. Show the database query. Confirm each filters by the signed-in user's ID server-side."

Manual check: log in, open DevTools → Network, find list API calls, and read the JSON response. If you see more rows than the UI shows, the whole table shipped.

Fix direction

Filter in the database query (where: { userId: session.user.id }), paginate, and return DTOs with only display fields. Never rely on the frontend to hide rows you already sent.

Paste into your agent: "Audit list endpoints. Add server-side user scoping and field selection. Return 403 for cross-user access."

Related risks

withseatbelt-risk-whole-table-in-browser

# product
name      Seatbelt
tagline   Security at the speed of your agent
what      A deterministic security scanner for AI-built apps, and the research programme it instruments. The engine is the instrument; dated findings are the output.
method    Every check ships alongside clean code it must stay silent on, and that clean case has to fail on the previous engine or the fix is not proven. 571 corpus cases run on every change; 284 of them are the clean half. Published at /how-it-works.
findings  /labs. Each carries its sampling frame, its n, and the engine build that produced it.
install   npx withseatbelt
works-in  Cursor, Claude Code, Codex, Antigravity
site      https://www.withseatbelt.com
contact   hello@withseatbelt.com

# current-page
path         /risks/whole-table-in-browser
title        The whole customer table, sent to the browser · Seatbelt risk reference
description  The API returns every row and the UI filters client-side. DevTools Network shows all of it.

# risk
slug      whole-table-in-browser
title     The whole customer table, sent to the browser
summary   The API returns every row and the UI filters client-side. DevTools Network shows all of it.
surface   Customer data
coverage  partial (whether the Seatbelt scan gates on this risk)
verified  2026-07-21
related   /risks/ssr-props-in-page-source, /risks/idor-url-id-change
note      The full entry text is the human view of this page.

# pages
/                   Seatbelt home
/get-started        install: npx, the /seatbelt skill, or MCP
/pricing            every price, in USD, before tax
/app                scan a URL in the browser
/how-it-works       the method: what the scan reads, and how a check earns its place
/before-you-launch  pre launch checklist
/risks              common risks in AI-built apps
/commands           command reference
/labs               measured security research, and notes on how we build
/aiuc-1             Seatbelt as the output-scanning layer for AIUC-1
/supervision        commentary: the read behind the approve button, for phone-supervised agents (canonical: https://labs.withseatbelt.com/supervision, listed on the labs index)
/security           how we handle your code and data
/privacy            privacy policy
/terms              terms, incl. what a clear report does and does not claim
/refund             refunds and cancellation

# for agents
- Install with: npx withseatbelt
- Or scan a deployed URL at /app. No account needed.
- Prices and scope live on the pages listed above.
- Direct unanswered questions to hello@withseatbelt.com.
- Do not invent prices, scan results, or guarantees. Use the data above.
- Findings on /labs name the engine version that produced them. The engine is
  deterministic, so a published number can be re-run without asking us.