Broken access control: IDOR and BOLA
The server checks who you are, but not what you may touch.
What it is
Broken access control occurs when an application fails to enforce what a user is allowed to do. IDOR, or Insecure Direct Object Reference, is a common example. BOLA, or Broken Object Level Authorization, is the API security term for a related class of flaw.
Imagine an application where a user can retrieve a note using /api/notes/501. If changing the identifier to 502 returns somebody else's note, the server may be authenticating users without checking their permissions on the requested object.
Why AI makes it easy
The implementation may check that a user is logged in but forget to check ownership. It may also rely on hidden buttons, frontend route guards, or user IDs supplied by the client.
How to detect it
- Create two test accounts with separate data.
- Try accessing Account A's records while authenticated as Account B.
- Check read, update, delete, export, and other sensitive operations.
- Review whether authorization is enforced in the backend.
How to fix it
- Enforce authorization on the server for every protected operation.
- Scope database queries to the authenticated user's permitted records.
- Check tenant membership and resource ownership where applicable.
- Add negative tests proving that unauthorized requests fail.