Skip to content

00 · Foundations

What IDOR Actually Is

7 min readIDOR Hunting

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.

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 invoice
GET /api/invoices/1002 # someone else's, same session, same browser

No 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.

CALLER SESSION Alice (user_id: 42) GET /invoices/1002 Valid cookie attached GATE 1 · AUTHN Session Valid? Checks key is real. PASS (Alice) GATE 2 · AUTHZ Owner == Alice? Check never written. SKIPPED HORIZONTAL IDOR Bob's Invoice owner_id: 99 (peer) Same role, other user VERTICAL / BFLA Admin Function /admin/deleteUser Higher privilege role
Figure 1 IDOR happens between Gate 1 and Gate 2: the server verifies Alice's session, then fetches row 1002 without checking whether Alice owns it.

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.

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” 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.

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.

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.
  • 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.

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}

Teams often protect the primary read route, then forget the ownership check on secondary helper routes like export, email, or print.
Secondary-route IDOR. Replay the request with "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.
Enforce ownership inside the data-access layer or shared authorization service so every route (view, export, email, delete) checks record.owner_id === caller.id.
Connections8 backlinks · 7 outgoing · 12 cross-guideFull graph →
Open local graph around this page
Open full graph →
Click a node to open · Drag to reposition · Scroll to zoom

IDOR HuntingFor educational and authorized bug bounty use only.