The short version
Broken access control means an application fails to enforce who is allowed to do what. A logged-in user can read another customer's records, or reach an admin function, simply by asking for it. It sits at the top of the OWASP Top 10 because it is common, easy to exploit and leads straight to exposed data.
What broken access control is
Two separate checks protect most applications. Authentication answers "who are you". Access control, also called authorization, answers "are you allowed to do this". Broken access control is a failure of the second check.
The typical cause is not a bad check but a missing one. A developer adds a new endpoint, confirms the user is logged in, and forgets to confirm that the requested record belongs to that user. The feature works in every demo, because in a demo people only ask for their own data.
The main forms
| Form | What goes wrong | Example |
|---|---|---|
| Horizontal | A user reaches another user's data at the same privilege level | Customer A downloads customer B's invoice |
| Vertical | A user reaches functions meant for a higher role | A regular user calls the endpoint that deletes accounts |
| Cross-tenant | A user in one organization reaches another organization's data | An employee of one client sees another client's projects |
The horizontal form goes by two names. Insecure direct object reference (IDOR) is the older term. In APIs it is called broken object level authorization, or BOLA. The vertical form is known in APIs as broken function level authorization and is one route to privilege escalation.
An example
user_a views their own document, which has the ID 7001. They then change the number:
GET /api/documents/7002 HTTP/1.1
Host: app.acme.test
Cookie: session=<session for user_a>HTTP/1.1 200 OK
Content-Type: application/json
{"id": 7002, "owner": "user_b", "title": "Payroll 2026"}The server confirmed the session was valid and returned the document. It never compared the document's owner with the caller.
Switching to random identifiers such as UUIDs makes guessing harder but does not fix the flaw. IDs leak through shared links, logs, other API responses and browser history. If the ownership check is missing, any leaked ID still works.
Why scanners miss it
The request above is perfectly valid. A tool testing as a single user has no reason to think document 7002 belongs to someone else.
Finding these flaws takes a different method:
- Work out the roles, tenants and objects in the application.
- Sign in as at least two different users.
- Capture the requests one user makes, including the IDs.
- Replay those requests as the other user and compare the responses.
This is slow by hand and is the main reason penetration testing finds issues that automated scanners do not.
How to prevent it
- Deny by default. Every route requires an explicit permission. Forgetting to add one should block access, not grant it.
- Check ownership on the server, on every request. Never rely on the user interface hiding a button.
- Centralize the logic. Put authorization in one shared layer or policy instead of repeating it in each handler.
- Scope queries to the caller. Fetch "document 7002 where owner is the current user", not "document 7002".
- Write tests for the negative case. An automated test that user A cannot read user B's record catches regressions.
How Cloudgrip helps
Hydra runs AI agents against your web apps and APIs on every release. Setup includes two test logins, so the agents can test whether one user can reach another user's data or functions, including across tenant boundaries. A finding is reported only after its exploit replays from a clean session. Hydra writes the fix, as a pull request if you connect your repo, and attacks again after merge to confirm it holds.
FAQ
Is IDOR the same as BOLA?
They describe the same flaw. IDOR is the traditional web term and BOLA is the name used in the OWASP API Security Top 10.
Do UUIDs prevent broken access control?
No. They make IDs harder to guess, but IDs leak in many ways. Only a server-side ownership check fixes the problem.
Which CWE covers broken access control?
Several do. Common ones are CWE-284 (improper access control), CWE-862 (missing authorization), CWE-863 (incorrect authorization) and CWE-639 (authorization bypass through a user-controlled key).