Skip to main content
Sealgap

What is broken access control?

Broken access control is any flaw that lets a user reach data or actions they should not be able to reach. One customer reads another customer's orders. A signed-in user changes a record that belongs to someone else. A visitor who never signed in reads a table meant for staff. The app does what it was asked; it was never told to refuse.

Why it tops the list

The OWASP Top 10 is the most widely used list of web application risks, and broken access control is number one in its 2025 edition, as it was in 2021. It is common because it cannot be fixed once for the whole app. Every table, every screen and every action needs its own answer to the question "who may do this?", and one missed answer is enough.

The same flaw goes by other names. An insecure direct object reference, or IDOR, is the classic case: changing an ID in a request returns someone else's record. In APIs it is called broken object level authorization, or BOLA.

What it looks like in a Supabase app

In an app built with Lovable, Bolt or by hand on Supabase, the browser talks directly to the database. Access control lives in the Row Level Security policies and the table grants, so that is where it breaks:

  • A table with Row Level Security switched off, readable by anyone with the public key.
  • A policy whose condition is always true, so every signed-in user sees every row.
  • A policy that lets users update their own row, where the row also says whether they are an admin.
  • A view that reads a protected table with its owner's rights.
  • An Edge Function that trusts a user ID sent by the browser.

Five policies that leave a table open goes through the most common ones in detail.

How to find it

Reading the rules helps, but the reliable test asks the database directly, as a user. The two-user test signs in as one test user and asks for another's data; a step-by-step version is in how to test whether one user can read another user's data. Access control can also break later, when a change loosens a rule, so the test is worth repeating after changes rather than run once.

Also known as

IDOR insecure direct object reference BOLA broken object level authorization

Free check

See what one of your apps answers.

Certificate, browser protections and keys in public code. No account needed.

See what one of your own apps answers.

The free check looks at an app from the outside: whether it answers, its certificate, its browser protections and keys in its public code.