00 · Foundations
What IDOR Actually Is
Most tutorials reduce IDOR to changing ?id=1 to ?id=2 and call it a day. On real targets, IDOR is sneakier, hides in stranger places, and pays far better than that cliché suggests.
What actually breaks
Section titled “What actually breaks”An Insecure Direct Object Reference (IDOR) happens when your request names an object and the server reads or modifies it without checking whether you own it. That identifier can sit anywhere: the URL path, a query parameter, a JSON field, a custom header, a cookie, or a GraphQL variable.
Keep one distinction sharp: IDOR is an authorization failure, not an authentication failure. You are logged in with a real session. The server checked who you are, then forgot to check whether the object you asked for actually belongs to you.
The code that produces it is almost always this small. The developer asked whether the order exists. Nobody asked whether the order belongs to the caller.
The check that never got written (PATTERN)
// The eternal mistake. Valuation of the company is irrelevant.function getOrder(request) { order = db.find( request.getParameter("orderId") // does this row exist? ); return order; // returned. ownership never asked.}One digit, no payload (GET)
GET /api/invoices/1001 # your invoiceGET /api/invoices/1002 # someone else's, same session, same browserNo encoding, no WAF bypass, no crypto. Frameworks can escape SQL. Browsers can block a reflected XSS. A web application firewall (WAF) can chew on payloads all day. A human has to make the object-level authorization decision on every endpoint, and nobody implements it on all of them. Every endpoint is a door. The lock checks that a session exists. It does not check that this is your door. Somewhere in the app, one route was written while the author was thinking about lunch. Your job is to find that route.
Horizontal vs. vertical
Section titled “Horizontal vs. vertical”Two flavors, very different impact:
IDOR · Two Privilege Directions
- Horizontal: Same role, different victim. You’re a regular user. You access another regular user’s data. Most common; usually Medium-to-High depending on data sensitivity. Flow:
Alice (A) → reads → Bob's (B's) invoices - Vertical: Lower role, higher-privilege function. You’re a regular user. You hit an admin-only endpoint by manipulating IDs or routes. Almost always High-to-Critical. Flow:
Alice (A) → calls → /admin/deleteUser/123
This guide stays on object-level bugs. Vertical escalation, forced browsing, and account-takeover chains have their own taxonomy in the Broken Access Control guide. Read it after §06 for the chains.
Where it actually lives in OWASP
Section titled “Where it actually lives in OWASP”IDOR sits at #1 in both lists that matter. The OWASP Top 10:2025 files it under A01:2025 Broken Access Control, the same position it held in 2021. That edition is the current published one (release candidate 1 appeared in November 2025). The 2025 edition folded in server-side request forgery (SSRF). SSRF is another case of the server fetching something for a user without checking that the user may ask for it.
The OWASP API Security Top 10 (2023, still the current edition as of mid-2026) renames IDOR to BOLA (Broken Object Level Authorization). It remains API1. The rename matters: it shifts the framing from “the ID was guessable” to “the authorization check was missing,” which is what the bug actually is. Treat these two lists as the same problem class through different vocabulary.
IDOR vs BOLA vs BOPLA vs BFLA
Section titled “IDOR vs BOLA vs BOPLA vs BFLA”“IDOR” is the classic web-app term. The OWASP API Security Top 10:2023 split the same idea into three sharper categories. BOLA is Broken Object Level Authorization. BOPLA is Broken Object Property Level Authorization. BFLA is Broken Function Level Authorization. Name the one you found. Your report lands faster, and triagers are less likely to downgrade it:
| Name | What’s unprotected | Concrete example |
|---|---|---|
| BOLA API1:2023 | The object as a whole, “can I touch this record?” | GET /invoices/1002 returns another user’s invoice. This is “IDOR” in the classic sense. |
| BOPLA API3:2023 | Individual properties/fields, “can I read or set this field?” | Response leaks a hidden ssn field (excessive data exposure); or your PATCH body sets role: "admin" and the server accepts it (mass assignment). |
| BFLA API5:2023 | The function/endpoint, “am I allowed to call this at all?” | A regular user calls DELETE /admin/users/42. This is vertical IDOR’s API-shaped name. |
The one anti-pattern behind all of them
Section titled “The one anti-pattern behind all of them”Every format in this guide fails the same way, whether it is a sequential integer, a UUID, a MongoDB ObjectID, or a hashid. The application treats knowledge of an identifier as proof of authorization. “You knew the ID, so you must be allowed to have it.” That’s the whole bug. No identifier format, however random, fixes a missing server-side ownership check. Randomness only changes how hard the ID is to obtain, never whether the check exists.
The CWE map (for your reports)
Section titled “The CWE map (for your reports)”Cite the right weakness ID and your triager can classify the report in one read:
| CWE | Title | When to use it |
|---|---|---|
CWE-639 |
Authorization Bypass Through User-Controlled Key | The canonical IDOR/BOLA. Your default. |
CWE-566 |
Authorization Bypass Through User-Controlled SQL Primary Key | IDOR where the ID is used directly as a DB primary key in a query. |
CWE-285 |
Improper Authorization | The auth check is present but wrong. Good for BFLA. |
CWE-284 |
Improper Access Control | The broad parent. Use when nothing narrower fits. |
Impact menu
Section titled “Impact menu”- Read, view another user’s PII, invoices, messages, files, internal notes
- Update, change another user’s email, password, role, payment method (frequently leads to account takeover)
- Delete, destroy other users’ resources, irrecoverably in some apps
- Create on someone else’s account, plant data, files, comments, transactions
- Cross-tenant breach, in SaaS apps, read or modify data belonging to a different customer organization (almost always Critical)
Next step: find the data-shaped surface and set up your two accounts.
Hands-on lab drill
Section titled “Hands-on lab drill”You are logged in as Alice (user_id: 42). The main endpoint GET /api/invoices/1002 correctly returns 403 Forbidden when you try Bob's invoice. Then you click "Download PDF" on your own invoice and see this request in Burp:
POST /api/exports/pdf HTTP/2 Host: app.target.com Cookie: sid=alice_session_token Content-Type: application/json{“template”: “invoice_v2”, “record_id”: 1001, “include_tax”: true}
"record_id": 1002 using Alice's session. Because the PDF worker fetches row 1002 directly without reusing the invoice controller's ownership check, the server renders Bob's invoice as a PDF. See IDOR Bypasses for more secondary-route patterns.record.owner_id === caller.id.Related across the field guides
Section titled “Related across the field guides”- Run the 50+ test punch list in the IDOR Hunting Checklist.
- Step up from object swaps to role escalation in Broken Access Control Foundations.
- Discover unlinked API routes that hide IDORs in Recon Atlas: Access Control Testing.
Open local graph around this page
Linked from here
Links out to
- Broken Access Control: The Complete Bug Bounty Guide↗ Broken Access Control
- Standards Map: What to Cite in a Report↗ Bug Hunting
- The IDOR Hunting Checklist (50+ Tests)↗ Bug Hunting
- Foundations↗ Broken Access Control
- Access control testing↗ Recon Atlas
- Recon & Target SelectionIDOR Hunting
- Bypass TechniquesIDOR Hunting
IDOR HuntingFor educational and authorized bug bounty use only.