IDOR Explained: The Bug That Leaks Other People’s Data


Imagine you’re logged into a site and your invoice lives at /invoices/1042. You change the URL to /invoices/1043 — and you’re staring at someone else’s invoice. No hacking, no tools, just a number. That’s IDOR: Insecure Direct Object Reference, and it’s one of the most frequently reported and best-paid bug classes in bug bounty programs.

Why IDOR Happens

Developers check authentication (are you logged in?) but forget authorization (are you allowed to see this specific object?). The app trusts the ID in your request without verifying it belongs to you. It’s consistently in the OWASP Top 10 under Broken Access Control — and it’s everywhere, because the mistake is so easy to make.

Where to Look

IDOR hides anywhere the app references objects directly:

  • URLs: /users/123, /orders/987, /api/v1/documents/55
  • Parameters: ?file=report.pdf, ?account_id=42, hidden form fields
  • API responses: JSON blobs containing other users’ IDs, emails or tokens
  • Sequential IDs are the tell. If your resources are numbered 1041, 1042, 1043… an attacker just counts. (Unpredictable UUIDs help, but they’re not a fix — the authorization check is.)

How to Test — Legally

The rules here are stricter than usual, because the “test” touches other users’ data:

  • Scope first. Only test programs where you have explicit permission (HackerOne, Bugcrowd, Intigriti scopes). Out-of-scope IDOR probing is unauthorized access — full stop.
  • Use your own test accounts. Create two accounts on the target. Try to access Account B’s data while logged in as Account A. You prove the flaw without ever touching a real stranger’s data.
  • Practice in labs first. PortSwigger’s Web Security Academy has free, legal IDOR labs. Burn through those before touching a live program.
  • Stop at proof. The moment you’ve confirmed you can read (not modify, not delete) another account’s object, stop. Screenshot it, document the request, and report. Never download bulk data, never escalate to write access “just to be sure.”
  • Only test systems you own or have written permission to test. Every technique on this blog, every time.

What a Good Report Includes

The exact endpoint and parameter, two test accounts showing the access boundary being crossed, steps to reproduce, and the impact: what data was exposed (PII? financial records?) and who could access it. IDOR payouts scale with impact — reading another user’s email address pays more than reading their public profile.

The Defense (For the Developers Reading)

Check authorization on every object access, server-side, every time — never trust the client-supplied ID. Use indirect reference maps or per-session tokens where it makes sense, and log authorization failures: a burst of 403s from one user is someone probing for exactly this bug.

IDOR is the perfect beginner bounty bug: no exploit chains, no fancy tooling — just methodical thinking about who should be allowed to see what. Find it in a lab this weekend; report it through a real program next.

Comments

Popular Posts