BOLA / IDOR Prevention Checklist
A logged-in user asks for an invoice, an export or a file by ID, and your API hands it over, even when it belongs to another tenant. That is Broken Object Level Authorization (IDOR), OWASP API1:2023. Answer yes or no about your own API: object checks, every route and verb, IDs and links, admin functions, tests and detection. You get a 0–100 score and the gaps ranked, each with the fix. Test only systems you own or have written permission to test, with test accounts.
Authentication is likely your only barrier. Start with the tenant-scoped query, then cover every verb, export and batch route.
- Object checks0
- Every route and verb0
- IDs and links0
- Function-level authorisation0
- Tests0
- Detection0
Prioritised gaps
Highest-weight, least-done items first. Work from the top.
- Object checks · unanswered
Add the tenant or owner condition to the query so a row from another tenant does not exist for this caller.
BOLA / IDOR explained → - Every route and verb · unanswered
Route every state-changing verb through the tenant-scoped lookup, then add the update.
API Auth Lab → - Every route and verb · unanswered
Scope the job lookup to the caller; serve the file through a short-lived, single-use signed URL after the check passes.
- Every route and verb · unanswered
Add the tenant filter to the loader every resolver shares, and return an error per item the caller may not see.
- Object checks · unanswered
Ignore client-supplied tenant fields, or reject the request when they do not match the token.
- Object checks · unanswered
Move the filter into one shared repository or ORM scope instead of repeating it in each handler.
- Object checks · unanswered
Replace per-handler lookups with one helper that every verb calls before touching the object.
- Function-level authorisation · unanswered
Mount the whole admin prefix behind one role check and deny by default.
+ 17 more in the checklist below and in the export.
Object checks · weight 24
The root cause is a missing per-object check: the request is authenticated, but nothing compares the object's tenant or owner with the caller's.
Every object lookup by ID is scoped to the caller's tenant or owner in the query itself (WHERE id = ? AND tenant_id = :tenantFromToken).
BOLA / IDOR explained →The tenant and user come from the verified token or session, never from a tenant_id in the path, query or body.
The tenant filter lives in the data-access layer (a repository or ORM scope applied to every query), so a new endpoint cannot forget it.
Objects that belong to another tenant answer 404, not 403, so the API does not confirm which IDs exist.
Reads and writes use the same "fetch this object for this caller" helper, so every verb gets the same check.
Every route and verb · weight 22
Teams check GET carefully and forget PUT, PATCH and DELETE. Batch, search, export and GraphQL routes added later are new places for the check to be missing.
Export jobs and generated files are scoped to the caller's tenant (and, for sensitive exports, the creator), not just fetched by job ID.
Batch, search, bulk and GraphQL resolvers authorise every object they return, in a shared data loader rather than each resolver.
A route with no declared authorisation fails closed: a new endpoint cannot ship without an owner or tenant rule.
OpenAPI Gap Analyser →Nested and related objects (an invoice's attachments, a project's members) are authorised as objects of their own, not only through the parent.
IDs and links · weight 12
Random IDs are hard to guess, but they leak through share previews, logs, emails, URLs and list endpoints. Once one leaks, only the check protects the object.
No object is protected only by an unguessable UUID: the endpoint checks who is asking even when the ID is random.
Public or cross-tenant responses (share previews, directories) do not return internal object or user IDs they do not need.
List endpoints that show IDs across tenants are paired with detail endpoints that still check the caller.
Files reachable without login use a separate expiring, single-purpose token, not the object's own ID.
Function-level authorisation · weight 14
The sibling flaw (OWASP API5:2023, BFLA): the UI hides the admin button, but the API route only checks that the caller is logged in.
Every admin route checks the role on the server, at the router or gateway, before any handler runs; hiding a button in the UI is not the control.
Each route declares the permission it needs and one policy engine enforces it; a route without a declaration fails closed.
Sensitive functions outside /admin (role changes, user management) are authorised by action, not by URL prefix.
A user cannot change their own role or privileges; role is not a field a member can write.
Tests · weight 14
The reliable way to find a missing check is to replay requests as another tenant and another role, on every endpoint and verb.
Automated tests replay each endpoint and verb with a token from another tenant and expect 404.
API Auth Lab →Tests call every admin route with a member token and expect 403.
A new endpoint cannot be merged without its cross-tenant test (or the test is generated from the route table).
API Security Posture Score →Detection · weight 14
Even a fixed API gets probed. Logging who asked for whose object turns a silent flaw into an alert.
You log the caller's tenant and the object's tenant on object reads and writes, and alert when they differ on a success.
You alert when one principal requests many distinct object IDs in a short window, especially in ascending order, or a burst of 404s on one object endpoint.
Audit events for state changes record the actor, the actor's tenant and the object's tenant.
Role changes by a non-admin, role changes where actor equals target, and 2xx on admin routes for non-admin roles raise alerts.
Educational self-assessment from PlayCISO. The weights are a judgement framework for structured self-reflection, not a measurement, certification or guarantee. Test only systems you own or have written permission to test, and use test accounts, never real customers' data. Based on PlayCISO's BOLA / IDOR Hunt Lab content and the OWASP API Security Top 10 2023. The checklist runs in your browser and uploads nothing; your answers live only in the link you choose to copy.
Loading…
Sample report · illustrative data
Sample result: BOLA / IDOR prevention checklist
Example answers for a made-up multi-tenant invoicing API: reads are tenant-scoped, but updates and exports skip the check, a GraphQL batch field was added later and nobody replays requests as another tenant.
Overall
- BOLA / IDOR readiness
- 44 / 100 (Exposed)
- Items answered
- 25 of 25
Score by section
| Section | Weight | Score |
|---|---|---|
| Object checks | 24 | 58 |
| Every route and verb | 22 | 31 |
| IDs and links | 12 | 40 |
| Function-level authorisation | 14 | 52 |
| Tests | 14 | 20 |
| Detection | 14 | 45 |
Prioritised gaps (first five)
- Every route and verb: run PUT, PATCH and DELETE through the same tenant-scoped lookup as GET.
- Every route and verb: scope export jobs to the caller and serve files through a short-lived signed URL.
- Object checks: add the tenant condition to the query itself so another tenant's row does not exist for the caller.
- Every route and verb: add the tenant filter to the data loader that GraphQL batch resolvers share.
- Tests: replay each endpoint and verb with another tenant's token in CI and expect 404.
Made-up example data. Your own run uses your inputs. Downloads of the full report need Pro.
TL;DRWhat this checklist is
5 points
- For developers and AppSec leads: how exposed is your own API or application to Broken Object Level Authorization (IDOR, OWASP API1:2023)?
- Six weighted sections: object checks, every route and verb, IDs and links, function-level authorisation, tests and detection. Answer yes, partly, mostly, verified by test or N/A.
- The root cause it targets is a missing per-object tenant or owner check, even when the caller is authenticated.
- You get a 0-100 score, prioritised gaps and a one-line fix for each. Cross-tenant read, write and export checks carry the most weight.
- Runs in your browser; nothing is uploaded. Test only systems you own or have written permission to test, with test accounts. Share the exact checklist with a link; CSV and Markdown exports are available.
Authenticated is not authorised
The usual cause is a handler that loads an object by primary key alone and returns it. Nothing compares the object’s tenant with the caller’s. The same gap shows up again whenever a new way to reach an object is added: a batch resolver, a search or export route, a PUT that someone wrote separately from the GET. And an unguessable UUID is not a control once a share preview, a log line or a list endpoint has handed it out.
The fixes are consistent: scope the query itself to the caller’s tenant, put that filter in the data-access layer, answer 404 for objects that are not theirs, check admin functions on the server rather than hiding a button, replay every endpoint and verb as another tenant in CI, and alert when the caller’s tenant and the object’s tenant differ. The weights here are a heuristic, shown openly; this is a self-assessment, not a certification. For the full explanation read BOLA / IDOR explained.
Frequently asked questions
What is BOLA (IDOR)?
Broken Object Level Authorization, also called IDOR, is OWASP API1:2023. The API accepts an object ID from the caller and returns or changes the object without checking that this caller may access it. Authentication happened, so the request looks authorised, but nothing compares the object's tenant or owner with the caller's.
Do random UUIDs prevent it?
No. UUIDs make guessing harder, so use them, but IDs leak through list endpoints, share previews, logs, emails and URLs. Once one leaks, only the authorisation check stands between an attacker and the object. Random job IDs make enumeration harder; the tenant check is the fix.
Why are PUT, PATCH and DELETE a common gap?
Reads and writes on the same object often get different checks. Teams test GET carefully and forget the other verbs, so a member of one tenant can void or change another company's records. Fetch the object through the same tenant-scoped helper for every verb.
Should the API answer 403 or 404 for another tenant's object?
Answer 404. A row from another tenant then does not exist for this caller, and the API does not confirm which IDs exist. Put the tenant filter in the data-access layer so a new endpoint cannot forget it.
How do I test for it safely?
Only on systems you own or have written permission to test, and with test accounts. Use two tenants and two roles: fetch an object as the owner, replay it as another tenant (expect 404), and call admin functions with a member token (expect 403). Automate it per endpoint and verb in CI, and log caller tenant against object tenant so a mismatch alerts.
More tools like this
Related tools and labs, with new picks every day.