Insecure Direct Object Reference (IDOR)

Type of access control vulnerability that arises when an application uses user-supplied input to access objects directly. The term IDOR was popularized by its appearance in the OWASP 2007 Top Ten.

Alternative name is Authorization Bypass.

Related Concepts:

Image of IDOR vulnerability architecture diagram

Shutterstock

Explore

Core Principles

Authorization cannot happen before authentication.

If the application doesn't know who you are, it cannot verify what permissions your user has. If an IDOR doesn't require you to authenticate (login or provide session information), you must fix authentication first before fixing the authorization issue.

Technical Mechanism (The "Why")

IDOR Variations (The "Disguises")

Type Appearance Example Exploitation Method
Simple / Sequential user_id=10 Change the integer to 11, 12, etc.
Encoded id=Mg== Decode Base64 (Mg== 2), increment, then re-encode.
Hashed id=c4ca42... Identify hash (MD5, SHA1). Requires knowing the input seed to replicate the hash.
Algorithmic / UUID uuid=... If UUID v1 is used, it is time-based. It can be brute-forced if the generation time is known.

Practical Discovery Techniques

Where to Look

Essential Tools

UUID Prediction Math

If the app uses UUID v1, and you know the generation time window (e.g., "between 20:00 - 21:00"), you can generate all possible UUIDs for that range.

Testing Workflow (Iterate & Observe)

  1. Capture: Inspect HTTP requests (GET, POST, PUT, DELETE).

  2. Identify: Locate parameters that look like references (id, user, account, file).

  3. Decode: If the value looks complex, try Base64 decoding or Hash Identification.

  4. Alter:

    • Increment/Decrement numbers.

    • Swap UUIDs with another user's UUID (if known).

    • Pollute parameters (e.g., change ?id=10 to ?id=10&id=11).

  5. Observe: Did the server return data? Did it return different data?

Mitigation (How to Fix)