In short
An IDOR (Insecure Direct Object Reference) vulnerability allows access to another user’s data simply by modifying an identifier in a URL or request, because the application does not verify that the requested object actually belongs to the logged-in user. This is a form of flawed access control—the first category in the OWASP Top 10—and one of the most common and serious vulnerabilities in web applications and APIs.
A concrete example
A logged-in user views their order at the address /api/orders/58213. They replace 58213 with 58212: the API returns another user’s order, including their name, address, and phone number. The application verifies that the user is logged in, but does not verify that the order belongs to them.
With a simple script, an attacker can iterate through all identifiers and extract the entire customer database.
Why is it so common?
- Frameworks handle authentication (who are you?) but rarely handle authorization on a per-object basis (do you have permission to view this?).
- APIs expose identifiers that the interface hides.
- Automated scanners cannot determine whether data “belongs” to someone.
Random identifiers (UUIDs) make enumeration more difficult but do not fix the vulnerability: a single identifier leaked elsewhere is sufficient.
How to fix it
For every request, on the server side, verify that the requested object belongs to the logged-in user or that the user has explicit permission to access it—for example, by systematically filtering database queries based on the owner’s ID or customer account ID.
Frequently asked questions
Are IDOR and BOLA the same thing?
Yes. IDOR is the historical term used on the web; BOLA (Broken Object Level Authorization) is the name adopted by OWASP for APIs.
How can you detect an IDOR?
To test this, use at least two accounts: replay the requests from the first account using the second account’s session and verify that they are rejected. This is a test conducted by penetration testers and offensive AI agents.
Sources
Find out where an attacker would get in.
Our AI agents actually attack your scope, fully automated, and hand you the proof of every vulnerability.
