--- title: "BOLA / IDOR Explained: Fix Broken Object Authorization" url: https://playciso.com/blog/bola-idor-explained-broken-object-level-authorization updated: 2026-11-28 section: Blog publisher: PlayCISO --- # BOLA / IDOR Explained: Fix Broken Object Authorization > What IDOR and BOLA are, nine ways they hide in APIs, how to test your own app with two accounts, and how to fix them. Real cases from our Breach Index. Source: https://playciso.com/blog/bola-idor-explained-broken-object-level-authorization · Published: 2026-11-28 · Publisher: PlayCISO (https://playciso.com) Primary source: https://api-security.owasp.org/editions/2023/en/0xa1-broken-object-level-authorization/ --- **IDOR** (insecure direct object reference), called **BOLA** (broken object level authorization) in API language and listed by OWASP as **API1:2023**, is one of the simplest and most costly flaws in web applications. The server checks that you are logged in, then returns whatever object you ask for without checking that it is *yours*. Change the number in the request and another customer's record comes back. **Who this is for:** developers, AppSec and platform leads, and security leaders who want to know how exposed their own APIs are and how to find out in an afternoon. *Independent guide. PlayCISO is not affiliated with any organisation named. Test only systems you own or have written permission to test, with test accounts and test data.* The short version - The bug is the missing check, not the ID format. Sequential numbers only make it easy to find. - It is not only reading. Teams test the read carefully and forget update and delete. - Every new way to reach an object (export, batch, search, nested field) is a new place for the check to go missing. - Random IDs are not the fix. Once an ID appears in a share link, log or another response, its randomness protects nothing. - The fix lives in the query: look the object up by its ID and the caller's own tenant, in one shared data layer. ## What it looks like You open `/invoices/1043` and see your invoice. You change the number to `1044` and an invoice belonging to another customer appears. That is an IDOR. The same flaw hides in an ID sent in a request body, a header, a GraphQL field or a parameter the front end sends without you seeing it. ## Why it happens The handler loads the object by its primary key alone, for example `SELECT … WHERE id = ?`, and returns it. Authentication happened, so the request looks authorised, but nothing compared the object's owner or tenant with the caller's. **Logged in is not the same as allowed.** ## Nine ways it hides in a multi-tenant API These are the nine flaws in our [BOLA / IDOR hunt lab](/tools/bola-idor-hunt-lab), a fictional invoicing API you attack from two tenants. Each is a pattern seen in real systems. | Flaw | Why it happens | | --- | --- | | Any tenant can read any invoice | The read handler loads by primary key and never compares tenants. | | Any tenant can change any invoice's status | The update handler was written separately and only validates the body. Reads and writes on the same object often get different checks. | | Export jobs are sequential and readable by anyone | Jobs are fetched by ID with no owner check, and creating one tells you every other job's ID. A finished export can be another company's customer list. | | The batch resolver skips the per-object check | The single-object lookup checks the tenant; the batch lookup was added later for speed without the same filter. | | Attachments protected only by a UUID | The team assumed the random ID was secret, but a public share preview handed it out. | | Profiles leak across tenants | A shared vendor directory lists contacts by user ID, and the profile endpoint trusts that only colleagues know an ID. A list that leaks IDs plus a detail route that does not check is the classic indirect BOLA. | | A member can deactivate users | The admin UI hides the button, but the route only checks that you are logged in. This is BFLA (API5:2023), a missing check on the function. | | A member can make themselves admin | The role-change route lives outside /admin, so the admin router's check never applied. | | Members can read the tenant audit log | The endpoint was added without the router-level role check its neighbours have. | ## Real cases in our Breach Index Each entry states what the organisation or a regulator confirmed, what is only reported, and where the mechanism wording comes from. We list only cases where the mechanism is described as an object-level failure, an insecure direct object reference or an ID change. | Organisation | What is on record | Confidence | | --- | --- | --- | | First American Financial | New York's financial regulator says replacing the document ID in a link with another sequential number gave access to unrelated documents without authentication. SEC fine $487,616 (June 2021); NYDFS fine $1,000,000 (November 2023). Neither says anyone other than the journalist used the flaw. | Confirmed by regulators | | McDonald's hiring platform (Paradox.ai) | Researchers reported an insecure direct object reference in an internal API on 30 June 2025. McDonald's says it was resolved the day it was reported; Paradox.ai says researchers accessed five candidate records. The researchers say more than 64 million records could have been exposed. | Researchers' mechanism; vendors confirm the fix | | Peloton | Pen Test Partners found an API that returned workout data for any user ID, including private profiles. Peloton confirmed the fix to TechCrunch in May 2021 and did not say it was exploited. | Reported, fix confirmed | | USPS | KrebsOnSecurity reported in November 2018 that an API let any logged-in user query other users' account details. USPS modified the API and said it had no information that it was used to exploit records. Krebs called it an authentication weakness; it is an object-level failure in our reading. | Reported, our classification | | Dell | Dell confirmed a portal incident in May 2024. The mechanism, generated service tags submitted through partner accounts, is the seller's account and not confirmed by Dell. | Mechanism unverified | | iFood (Brazil) | iFood confirmed about 1.2 million users affected. Media reports say a portal for legal requests had an IDOR; iFood's statements as reported do not mention it. | Reported | ## How to test your own application in an afternoon - Create two accounts in a test environment, with test data. - As account A, copy the ID of something it owns: an order, an invoice, a profile, an export, an attachment. - As account B, request that same object. If the content comes back, you have an IDOR. - Try every verb. Read, change and delete. Reads are often checked; PUT, PATCH and DELETE are often forgotten. - Try every door. List, search, export, batch and GraphQL routes, nested objects, and any link or response that contains an ID. - Try the function-level checks too. Call admin routes and role changes with a member token, because hiding a button is not a control. Never run this against a system you do not own without written permission, and stop at the first proof when testing under permission. ## How to fix it - Scope the query itself: WHERE id = ? AND tenant_id = :tenantFromToken. A row from another tenant then does not exist for this caller. - Put the filter in the data-access layer (a repository or ORM scope applied to every query) so a new endpoint cannot forget it. - One helper for every verb: fetch the object for the caller once, then read, update or delete it. - Answer 404, not 403, for objects in another tenant, so the API does not confirm which IDs exist. - Test it forever: an automated test per endpoint and verb that replays a request with a token from another tenant and expects 404. - Do not rely on random IDs. Use them as defence in depth, not as the control. ## How to detect it - Log the caller's tenant and the object's tenant on every object read, and alert when they differ on a successful response. - Alert on one caller requesting many distinct IDs in a short window, especially in ascending order. - A spike in 404s on an object route from one token is enumeration against a fixed endpoint, worth a look even when it fails. - Write the actor's tenant and the object's tenant into the audit event for every state change. ## What security leaders should do this week - Run the two-account test on your three most sensitive object types: invoices or payments, customer records and exports. - Ask for the rule in writing: where in the code does the tenant or owner check live, and does every new endpoint inherit it? - Add cross-tenant tests to CI for every endpoint and verb. - Review list, export, batch and search routes separately from the main CRUD routes. - Turn on the tenant-mismatch alert and review what it shows. - Score yourself with the [BOLA / IDOR prevention checklist](/tools/bola-idor-checklist), then practise the hunt in the [hunt lab](/tools/bola-idor-hunt-lab). ## Frequently asked questions ### What is IDOR? IDOR, insecure direct object reference, is when an application checks that you are logged in but not that the object you asked for is yours. Change the number in the request and someone else's record comes back. In API language the same flaw is called BOLA, broken object level authorization, which OWASP lists as API1:2023. ### Is IDOR the same as BOLA? In practice yes. IDOR is the older web term and BOLA is the name OWASP uses for APIs (API1:2023). Both mean a missing check that the caller is allowed to access this particular object. BFLA, broken function level authorization (API5:2023), is different: it is a missing check that the caller may perform this action at all, such as an admin-only route. ### Are UUIDs enough to prevent IDOR? No. A long random ID makes IDs harder to guess, but the flaw is the missing ownership check. In our lab, attachments were protected only by an unguessable UUID, and a public share preview handed the ID out. Once any response, log line, email or URL contains an ID, its randomness stops protecting anything. ### How do I test my own application for IDOR? Create two accounts. Copy the ID of something the first one owns, such as an order, an invoice or a profile, then request it while logged in as the second. If the content comes back, you have the flaw. Repeat for every verb (read, change, delete) and for list, export, search and batch routes. Use test data only. ### Is it legal to test a website for IDOR? Only on systems you own or have written permission to test. Changing an ID in a request on someone else's system to see other people's data can be unauthorised access in many places, even if you mean well. Use two test accounts on your own application, or an authorised test. ### How do you fix an IDOR? Scope the lookup itself to the caller: load the object by its ID and the caller's own tenant or owner from the login token, so another customer's row does not exist for that caller. Put that filter in one shared data layer, answer 404 rather than 403, and add an automated test per endpoint and verb that replays a request with another account's token and expects 404. ### Which well-known organisations had an IDOR or BOLA flaw? Our Breach Index covers six cases with their sources and confidence levels: First American Financial (the NYDFS order describes changing a sequential document number in a link), McDonald's hiring platform run by Paradox.ai (researchers describe an insecure direct object reference), Peloton (a workout API that returned data for any user ID, per Pen Test Partners), USPS, Dell and iFood. Each entry says what is confirmed and what is only reported. ## Sources - [OWASP API Security Top 10 2023: API1:2023 Broken Object Level Authorization](https://api-security.owasp.org/editions/2023/en/0xa1-broken-object-level-authorization/) (opened 28 November 2026; API5:2023 Broken Function Level Authorization is the neighbouring entry) - PlayCISO's own [BOLA / IDOR hunt lab](/tools/bola-idor-hunt-lab) content: the nine flaws, root causes, fixes and detection above - The six [Breach Index](/breach-index/first-american) entries linked in the table, each with its own primary and press sources: [First American](/breach-index/first-american), [McDonald's](/breach-index/mcdonalds), [Peloton](/breach-index/peloton), [USPS](/breach-index/usps), [Dell](/breach-index/dell), [iFood](/breach-index/ifood)