← Learn

Sensitive data shipped to the browser: config, internal fields, and bulk PII

Server config, internal-only fields, and large dumps of personal data sometimes get baked into the frontend. Here is why that is an access-control problem and how to fix it.

Beyond secret keys, AI-built apps sometimes ship data to the browser that should have stayed on the server: internal configuration, fields meant only for admins, or large amounts of customer PII embedded in the page or an over-broad API response.

What gets flagged

The fix

  1. Return only the fields and rows the current user is allowed to see — enforce it server-side (RLS or API checks), not in the UI.
  2. Keep internal config out of client bundles and public API responses.
  3. Shape API responses to the minimum the screen needs.

→ Scan your app free

FAQ

Why is data (not a key) in my frontend a security issue?
Because anything sent to the browser is visible to the user. Internal fields, admin-only columns, or other users’ PII in the page mean your access control is being done in the UI instead of on the server.

How do I fix an API that returns too much?
Enforce row- and field-level access on the server (RLS or explicit checks) and shape responses to the minimum the current screen needs, rather than filtering in client code.

Related questions

Check your own app
Free passive scan, ~10 seconds, no login.