Broken Object-Level Authorisation (BOLA)
API endpoints act on the object identifier supplied in the request without checking that the caller may access that object, so users can read or change other users' records.
| Severity | High |
| CVSS 3.1 | 7.1 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N Open in the calculator |
| CVSS 4.0 | 7.1 CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N Open in the calculator |
| CWE | CWE-639: Authorization Bypass Through User-Controlled Key |
| OWASP Top 10 | A01:2025 Broken Access Control |
| MITRE ATT&CK | T1190 Exploit Public-Facing Application |
| Category | Broken Access Control |
Description
APIs identify the objects they act on through values in the request: path segments, query parameters, fields in a JSON body, headers, or node identifiers in GraphQL. The API checks that the caller is authenticated, but not that the specific object requested belongs to the caller or is one they are permitted to reach, so changing the identifier gives access to another user's or another tenant's object. This is the first item in the OWASP API Security Top 10, and it is the API form of what is often reported in web applications as an insecure direct object reference.
An attacker with an ordinary account can read and, depending on the methods affected, change or delete the records of other users or tenants by iterating through or harvesting identifiers. Typical consequences are exposure of personal data, documents, orders, messages or financial details at scale, and unauthorised changes to other users' data. Where identifiers are sequential, the whole data set can be enumerated with a simple script; unpredictable identifiers such as UUIDs make objects harder to find, but do not prevent access once an identifier is known or leaked. The impact depends on the sensitivity of the objects and on whether write and delete operations are affected.
The weakness is frequent in APIs because each endpoint, method and version needs its own check, and because mobile and single-page clients make every identifier visible to the user. Variants include endpoints that check ownership on read but not on update or delete, nested resources where the parent is checked but the child is not, bulk and export endpoints that accept lists of identifiers, and multi-tenant APIs that trust a tenant or organisation identifier sent by the client.
The weakness is identified by repeating each request that carries an identifier with two accounts of the same role, and across tenants, substituting the other account's identifiers and comparing the responses. Tools such as the Autorize extension for Burp Suite automate the comparison.
Remediation
Check authorisation for the specific object on every request, on the server:
- For every endpoint and method that takes an object identifier, verify that the authenticated caller may perform that action on that object before acting on it. Derive the caller's identity and tenant from the validated session or token, never from a field supplied by the client.
- Enforce the check where data is retrieved, for example by scoping queries to the caller (
WHERE id = ? AND owner_id = ?, or a tenant filter applied to every query by the data access layer), so that an object the caller may not see is never loaded. Return the same not found response for objects that do not exist and for objects the caller may not access. - Centralise the rules in a policy or authorisation layer used by every endpoint, version and method, including bulk and export endpoints and GraphQL resolvers, and deny by default.
- Where the design allows, prefer endpoints that act on the caller's own resources without taking an identifier, such as
/me/orders. - Add automated tests that call each endpoint as a second user and as another tenant, and fail the build if access succeeds.
Random identifiers add some defence in depth but are not a fix. Confirm the fix by repeating the cross-account and cross-tenant requests for every affected endpoint and method and checking that each is refused.
References
Add This Finding to Your Library
In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.
Free trialYour trial starts when your portal goes live, not when you sign up, so the time you spend setting up does not count. · No card required
Only need the reporting? Our reporting tool is free and open source, with the same library.