IDOR Testing Methodology
A repeatable multi-identity swap-and-diff loop: capture every object-touching request as the owner, replay it with a non-owner’s session, and prove whether the server made a subject-to-object decision.
How it works
IDOR can’t be found by a scanner holding one token: it needs knowledge of the data model and at least two valid identities that own real objects. Hunters with two accounts find it; pipelines with one service token don’t (agentoffense, SiteGuarding). Expect manual work: a human has to decide where an object is referenced and what should be swapped (Aon).
Identity matrix
Build four token contexts before testing, each owning objects:
| Context | Axis covered |
|---|---|
| A — victim, tenant 1 | baseline owner |
| B — same role, tenant 1 | horizontal intra-tenant (most missed: many apps check “same org” and stop) |
| C — tenant 2 | cross-tenant (Multi-Tenant Isolation) |
| D — lower-priv / unauthenticated | vertical (Function Level Authorization, Privilege Escalation) |
Add a revoked context: an identity that legitimately held access, captured IDs, then was removed. One researcher kept reading a private page’s member list (emails, permission levels) via a documented-but-unused GET /api/page/{pageId}/info after the admin removed them (The User Was Removed).
Core loop (per object-touching request)
- Baseline 2xx with the owner.
- Replay identical request with non-owner token + owner’s object ID.
- Diff status, body, length, headers, timing — not just status.
- Re-fetch as owner to see if state changed (writes can “fail” yet commit).
TheXSSRat runs the same “three requests + matrix” on every endpoint and logs the result (Three-Request Method); OWASP’s prescription is identical: users A/B, objects owned by each, swap references across read, create, update, delete, export and admin operations (OWASP IDOR Cheat Sheet).
Techniques / payloads
Where IDs live (swap each independently)
Path segment, query string, JSON body, form field, multipart part, headers (X-User-Id, X-Tenant-Id), cookies, GraphQL variables/inline args, batch array elements (agentoffense, Bugcrowd).
Path authorized, body trusted — the most common modern miss:
PATCH /documents/d-123 # A owns d-123: check passes
Authorization: Bearer <A>
{"project_id": "p-999"} # B's project: only existence is validatedResponse embeds B’s project (name, owner email). Laravel exists:projects,id and DB foreign keys validate existence, not ownership; Postgres FK checks bypass RLS, so the cross-account link is written even under RLS (jrobineau).
Request-shape mutations
| Mutation | Example |
|---|---|
| HTTP parameter pollution | ?id=mine&id=victim — first, last or concatenated wins |
| JSON globbing | [1234,1235], {"id":{"id":1235}}, true, "*", "%", 00001235, -1, 1235.0, "1234,1235" |
| Method swap | GET-protected route reachable unprotected via POST |
| Content-type swap | framework parses alternate body type through a different path |
| Old API version | /v1/ still lacks the check fixed in /v3/ |
| Static keyword | replace me/current with your numeric ID, then victim’s |
| ID added to a list call | POST /api/user/posts normally filters hidden posts; adding "post_id":"<hidden id>" returns them ([[raw/community.protocall.ch/post-idor-hidden-posts-readable-by-id-listing-filter-bypass-15812 |
| Empty/invalid body | POST /reports/{id}/reference.json with {}: read the error body for object data ([[raw/oxo.is/idor-allows-user-to-access-report-details-via-reference-json-endpoint-15811 |
Sources: Intigriti, Weekly Bug Bounty, Aon. Wildcards/booleans on update/delete endpoints can hit many rows: test carefully.
/me/ routes are not self-authorizing: if the handler takes collection_id and calls db.get_collection(id) with no owner check, the prefix is decoration (/me/ endpoints). A current endpoint that rejects swaps may still lead to a sibling that doesn’t: one hunter’s denied profile swap led to an unguarded 2FA-removal endpoint (Weekly Bug Bounty).
Prioritization
- Writes over reads. PUT/PATCH/DELETE and “read-shaped POSTs” (CSV/XLSX export, PDF render, report generation, share-link creation, thumbnails, search) carry the damaging findings. A 403 that still mutates, fires a webhook or queues an email is a finding.
- Nested routes:
/orgs/{orgId}/projects/{projectId}/files/{fileId}often validatesorgIdmembership then loadsfileIdglobally — keep your parents, swap only the child. - Batch endpoints: send
[own, victim, own], move the victim to first/last; look for 207/partial success and non-rolled-back writes. - Object state flags: after the owner hides, blocks you, disables comments or deletes an object, retry read, comment and react by ID. Protocall enforced none of these on per-object endpoints (Protocall).
- Low-traffic features: draft autosave, mark-as-read, unsubscribe — not the main “send” path (Intigriti).
- Private vs public objects: start from user-scoped data (
/users/<id>/creditcard/details) rather than public product/review objects (Aon).
Evidence discipline
- 403 vs 404 consistency. Either is defensible; inconsistency (
/invoices/{id}→ 404 but/invoices/{id}/pdf→ 403) is an existence oracle. On GraphQL comparedata, not status (failures return 200 +errors). - False negatives to rule out: cached responses, soft-deleted/archived rows skipping the owner filter, 200-empty-body hiding a successful write, expired tokens (401 looks like a pass) — automate token refresh (agentoffense).
- Error bodies count. A 403/422 that echoes fields of the denied object is a disclosure (oxo).
- Run both directions and controls. A→B and B→A, plus a non-existent ID (404), no session (401) and own ID (200), to show the result is ID-driven and to note any enumeration oracle (profile IDOR).
- Use your own accounts only; prove with an empty test object. A missing check on a KYC draft is High even with no real passport downloaded (SiteGuarding).
- Severity hinges on ID reachability. Bugcrowd triage asked one hunter for a remote way to obtain the victim’s (encrypted) user ID before accepting a password-change IDOR (rohit443). See Predictable Identifiers.
Checklist
- ≥2 same-role accounts per tenant + second tenant + low-priv + revoked identity
- Object model mapped (OpenAPI, Postman, JS bundles/source maps, mobile traffic, GraphQL introspection, archived versions)
- Every ID location swapped independently, every method
- Body/foreign IDs on writes checked, not just path IDs
- Nested child swap, batch position swap, old versions, alt methods/content-types
- Full response diff + owner re-read after writes
- 403/404/timing consistency between sibling routes
- Token refresh automated; caches and soft-deletes excluded
Tooling
| Tool | Use |
|---|---|
| Autorize (Burp) | replays every proxied request with a low-priv cookie; flags enforcement status ([[raw/blackhatethicalhacking.com/maximizing-idor-detection-with-burp-suite-s-autorize-4378 |
| AuthMatrix, Auth Analyzer | user × request matrix; parallel sessions with per-session CSRF extraction |
| Session Switcher (Doyensec) | named sessions swapped in-editor, auto-updated from proxy traffic ([[raw/blog.doyensec.com/introducing-session-switcher-swap-burp-sessions-with-one-click-11406 |
| Burp Intruder / ffuf | numeric ID sweeps ([[raw/portswigger.net/testing-for-idors-portswigger-burp-docs-4380 |
| IDOR-Scanner | passive numeric-field detection, active increment + size/200 diff ([[raw/github.com/idor-scanner-burp-suite-extension-for-automated-idor-detection-4744 |
| ReproCase | deterministic reproduced/not_reproduced verdicts with fresh accounts ([[raw/github.com/reprocase-prove-idor-bola-role-and-cors-findings-with-fresh-test-accou-15622 |
| ExploitSpec | turns a confirmed BOLA into a RED→GREEN→STABLE CI regression test from HAR/cURL ([[raw/pazent.github.io/exploitspec-bola-idor-regression-tests-from-bounded-redacted-har-input-11961 |
LLM-driven probing works when findings are replayable: Brutecat fed ~1,500 Google API discovery docs to Claude as MCP tools with an IDOR/BAC brief, and accuracy passed 50% only after clustering endpoints, decoding error codes and attaching replayable operation IDs (Cyberkendra). See Authorization Testing Automation.
Related
- Insecure Direct Object Reference
- BOLA in APIs
- Predictable Identifiers
- Second-Order and Multi-Step IDOR
- IDOR to Account Takeover
- Authorization Testing Automation
- Broken Access Control
- Multi-Tenant Isolation
- Burp Suite Extensions
- Bug Bounty Methodology
Sources
- BOLA/IDOR testing: the multi-account object-swap harness · original
- IDOR Prevention Cheat Sheet · original
- Finding More IDORs – Tips and Tricks · original
- How-To: Find IDOR Vulnerabilities for Large Bounty Rewards · original
- IDOR: A Complete Guide to Exploiting Advanced IDOR Vulnerabilities · original
- Broken Access Control: Advanced IDOR Exploitation · original
- The Three-Request IDOR Method · original
- BOLA: your API checks the URL but misses IDs in the JSON body · original
- The Hidden IDOR Vulnerability in /me/ API Endpoints · original
- The User Was Removed. The Access Wasn't. · original
- BOLA in auto financing applications: case study · original
- IDOR on Password Change to Full Account Takeover · original
- How to Find IDOR Vulnerabilities: The Bug Bounty Hunter's Practical Guide · original
- Maximizing IDOR Detection with Burp Suite's Autorize · original
- Manual and semi-automated testing for IDORs using Burp Suite · original
- Introducing Session Switcher · original
- Testing for IDORs (PortSwigger Burp docs) · original
- IDOR-Scanner: Burp Suite Extension · original
- ReproCase · original
- ExploitSpec — BOLA/IDOR regression tests · original
- Researcher Used AI to Find $500000 Worth of Bugs Across Google's Internal APIs · original
- IDOR allows user to access report details via reference.json endpoint ($15000) · original
- Post IDOR: hidden posts readable by ID, listing filter bypass · original
- IDOR in /app-api/enduserapp/profile/{userId} — Cross-Account PII Disclosure · original