← Tips

OWASPA01Broken Access Control

Your App Hides Phone Numbers. The Network Tab Doesn't.

This app never shows other users' phone numbers on screen, but it sends every one of them to the browser. Anyone who presses F12 can read them. A two-minute check for your own app.

Watch on YouTube

The mistake

My demo app never shows other users' phone numbers. But when the page loads, it downloads one database row holding the whole app, and every user's phone number is in it. The app just doesn't display them.

Anyone can sign up. So anyone who presses F12 can read every phone number.

Why security rules can't fix this one

Supabase's Row Level Security decides which rows each person can see. This app even had it switched on. But there's only one row, so the answer is either "you get everything" or "you get nothing". There's no "you get your own part".

The fix

The two-minute check

  • Sign in as an ordinary user. A brand-new account is best.
  • Open DevTools (F12), go to the Network tab, and reload the page.
  • Click each request and look at the Response.
  • Search it for something private that belongs to someone else: a phone number, an email, an address.

If it's there, it's not private. Hidden on the screen is not the same as private.

The fix is to give each piece of data its own row so the database can protect it. The full walkthrough is in the video: One Bad Save Deleted My Entire App

The app in this tip is my own demo, built with fake data and intentionally insecure.