SECURITY GLOSSARY

IDOR (Insecure Direct Object Reference)

IDOR is an access-control flaw where an application exposes a direct reference to an internal object (a database ID, a filename) and does not verify the user is authorised for it, so manipulating the reference reveals other data.

What it is

IDOR is an access-control flaw where an application exposes a direct reference to an internal object (a database ID, a filename) and does not verify the user is authorised for it, so manipulating the reference reveals other data.

IDOR: change the reference, see other dataIDOR: changing ?doc=5012 (your contract) to ?doc=5013 returns another customer’s contract, because the server did not check authorisation. Common mistakes: link hidden in the UI only; sequential IDs assumed secret; checked on read, not on update or delete. IDORChange the reference, see other data?doc=5012Your contractChange the reference?doc=5013Another customer’s contractServer did not check authorisationCOMMON MISTAKESLink hidden in the UI onlySequential IDs assumedsecretChecked on read, not onupdate or deleteIllustrative.
IDOR: change the reference, see other dataIDOR: changing ?doc=5012 (your contract) to ?doc=5013 returns another customer’s contract, because the server did not check authorisation. Common mistakes: link hidden in the UI only; sequential IDs assumed secret; checked on read, not on update or delete. IDORChange the reference, see other data?doc=5012Your contractChange the reference?doc=5013Another customer’s contractServer did not check authorisationCommon mistakesLink hidden in the UI onlySequential IDs assumed secretChecked on read, not on update or deleteIllustrative.

Why it matters

IDOR is one of the most common and highest-impact web and API bugs, and it maps closely to BOLA in APIs. It is easy to introduce and easy to miss in review.

How we test it

We enumerate object references a role can see, then attempt to read or change references belonging to other users and roles, confirming server-side authorisation rather than UI hiding.

Common mistakes

  • Hiding a link in the UI but leaving the endpoint open
  • Using sequential IDs and assuming they are secret
  • Enforcing access only on read, not on update or delete

An example

Changing ?doc=5012 to ?doc=5013 downloads another customer’s contract.

Not to be confused with

IDOR is the web-wide name; BOLA is the API-specific case in the OWASP API Top 10.

In more detail

An object reference is anything a request uses to say which record it wants: a number in a URL, an identifier in a JSON body, a filename or a token in a header. The weakness is not the reference itself. It is the missing server-side check that the signed-in user may use that particular reference. Because the check is often absent for one object type or one action while everything around it is fine, IDOR tends to survive code review and automated scanning. A scanner can see that a request succeeded, but it cannot tell whether the record belonged to the person who asked.

IDOR falls under Broken Access Control, the first category in the OWASP Top 10 (2021). In APIs the same weakness is called BOLA, which the OWASP API Security Top 10 (2023) lists first.

How to reduce the risk

  • Check authorisation on the server for every request, using the identity from the session or token and never an identity or role supplied by the client
  • Scope database queries to the owner or tenant, so a record outside that scope is simply not found
  • Deny by default on new endpoints, and cover read, create, update, delete, export and download alike
  • Prefer unpredictable identifiers where practical, but treat them as defence in depth rather than a substitute for the check

What good testing evidence looks like

Testing needs at least two accounts for each role, and ideally two tenants. A useful finding names the account used, the object that crossed the boundary, the data or action exposed and the layer where the fix belongs. After remediation the same checks are repeated, so closure is confirmed rather than assumed. Authorisation tests that sign in as one user and request another user’s objects are worth keeping in the build pipeline so the gap does not return.

Related at PoCForge

Need this tested on your systems?

Share your scope and we will propose a human-led plan with proof and a retest.

Request a free scope review →