Web security
IDOR Explained: Insecure Direct Object References, with Examples
An insecure direct object reference (IDOR) is one of the simplest vulnerabilities to understand and one of the most damaging to find. It is also one of the most common in bug bounty reports. If you learn to test for one thing first, make it this.
What It Is
An application refers to an object, such as an invoice, a profile or a file, by an identifier in the request, and returns it without checking that the logged-in user is allowed to see it. Change the identifier, get someone else's data.
Simple Examples
- /invoice?id=1041 shows your invoice; /invoice?id=1042 shows another customer's
- An API call GET /api/users/58/address returns any user's address when the number changes
- A download link /files/report-2231.pdf works for anyone who guesses the number
- A form that updates a profile includes a hidden user ID, and changing it edits someone else's profile
Why It Is so Common
Developers often check that a user is logged in, but not that this user owns this object. The check must be written for every endpoint and every action, and one missing check is enough. Random-looking IDs make guessing harder but are not a fix: identifiers leak in URLs, emails and other responses.
IDOR and BOLA
In APIs the same flaw is called broken object-level authorization (BOLA), the first item in the OWASP API Security Top 10. In the web Top 10 it falls under broken access control, also number one; see the OWASP Top 10 explained.
How Testers Find It
- Create two test accounts, A and B, with their own data
- Use the application as A, recording every request in Burp Suite
- Replay A's requests with B's session, and swap object IDs between accounts
- Test every action: view, edit, delete, download, share
- Check IDs in paths, parameters, JSON bodies, headers and cookies
Use only test accounts and data you created. On bug bounty programs, stop at proof: do not browse real customers' records.
How Developers Fix It
- Check ownership or permission on the server for every object, on every request
- Derive the user from the session, never from a user-supplied ID
- Centralize authorization checks so they cannot be forgotten
- Write automated tests that try cross-account access
Learning Access-Control Testing
Our Application Security course teaches access-control testing systematically, with an endpoint and role coverage matrix in Burp Suite. Read bug bounty for beginners in India if you want to apply it on real programs.
Want to practice access-control testing? Book free trial classes. Contact us or call +91 86868 92922.
Courses Mentioned in This Guide
More Guides
OWASP API Security Top 10 Explained for Beginners
The OWASP API Security Top 10 (2023) in plain language: BOLA, broken authentication, property and function-level authorization, SSRF and more.
Read the guide →Bug Bounty for Beginners in India: How to Start Safely
How bug bounty programs work, the skills you need first, how to read scope and rules, write a good report, and avoid legal trouble as a beginner in India.
Read the guide →Burp Suite for Beginners: Proxy, Repeater and Intruder Explained
Get started with Burp Suite: Community vs Professional, setting up the proxy, and using Proxy, Repeater, Intruder and Decoder to test web applications legally.
Read the guide →JWT Security Explained: Common JSON Web Token Flaws
How JSON Web Tokens work and the flaws testers look for: unverified signatures, the none algorithm, weak secrets, key confusion, long expiry and data leaks.
Read the guide →Start Your Cyber Security Career
Talk to a counselor, choose the right course for your goals, and get the fee, syllabus and next batch dates in writing.
- Call+91 86868 92922
Open 7 days: Mon to Fri 8:30 AM to 8:30 PM IST
Sat and Sun 10 AM to 6 PM IST - Emailinfo@hackingtrainer.com
- VisitGround Floor, G-3, Sri Venkatasai Nest, Kallu Compound Road, Nagarjuna Nagar Colony, Yella Reddy Guda, Ameerpet, Hyderabad – 500073
Open in Google Maps