What is a BOLA attack?
BOLA (Broken Object Level Authorization) is number one in the OWASP API Security Top 10. It happens when an API verifies that the user is authenticated but not that they are entitled to that specific object. The attacker changes an identifier in the request — from /api/invoices/1001 to /api/invoices/1002 — and receives another customer's data. Nothing needs to be broken: it is enough to politely ask for someone else's resource.
Why is it so common in APIs?
In a classic web app the server decides what gets rendered; in an API the client requests objects by identifier, so every endpoint must validate resource ownership on its own. That check is easy to miss in one endpoint out of two hundred, and automated scanners do not catch it because the response is a perfectly valid 200: only a human who understands the data model knows that invoice did not belong to the caller.
How to prevent BOLA?
The rule is to enforce authorization server-side, on every endpoint, against the session identity and never against a client-supplied parameter. It helps to use unpredictable identifiers (UUIDs instead of sequential integers), to centralize the check in a shared layer rather than repeating it endpoint by endpoint, and to cover it with automated tests that deliberately request other users' objects. In an audit, this is the first case anyone tries against an API.



