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.
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
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
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
Sources
Need this tested on your systems?
Share your scope and we will propose a human-led plan with proof and a retest.
