Key Takeaways
- Insecure direct object references (IDOR), broken object level authorization, is consistently the most common and most damaging web and API flaw.
- The chain was: an IDOR reading other users' data, to an exposed privileged function, to admin account takeover, to a full database export.
- The flaw is almost always a missing check: the server trusts an id the client supplies instead of verifying the caller actually owns that object.
- Authorization must be enforced on every single request, server-side, per object. It cannot be assumed from the UI, which an attacker never uses.
- These flaws are invisible to most scanners because every request looks valid; finding them needs a tester who reasons about who should be allowed to do what.
A Normal Account and a Curious API
The target was a multi-tenant SaaS application. We did what any attacker does first: we became a customer, signing up for the cheapest plan to get legitimate, low-privilege access. With a real account we could watch how the front end talked to the back end, and the back end is where the real attack surface lives. Every button in the UI was really an API call, and the API was far more honest about what it would allow than the interface suggested.
Mapping those API calls, one pattern stood out immediately: many endpoints identified the thing you were acting on by a simple, sequential id in the URL, for example /api/invoices/1041. That is not a vulnerability by itself. It becomes one the moment the server fails to check that invoice 1041 actually belongs to you.
Link 1: Changing One Number Reads Everyone's Data
We took an API request for our own record and simply changed the id. Instead of our invoice, the server returned someone else's: a different customer, a different tenant, full details. The endpoint checked that we were logged in, but never checked that the object we asked for was ours. This is an insecure direct object reference, known in the OWASP API Top 10 as broken object level authorization, and it is the single most common serious web flaw there is.
Because the ids were sequential, we did not have to guess. We could walk the range, 1040, 1041, 1042, and retrieve record after record across every tenant on the platform. Already, at link one, this was a confidentiality breach: any customer could read every other customer's data by changing a number.
- Capture one authenticated request, change the object id, and observe whether the server returns another user's data. That is the whole test, and it finds more real breaches than any scanner.
- Sequential or predictable ids make it trivial to enumerate every record; even random ids do not fix the underlying missing-authorization flaw.
- The server must check ownership on every object access, not just that the caller is authenticated.
Want to Know Your Real Attack Chain?
Codesecure runs red team and internal penetration tests that start where a real attacker starts: an unauthenticated foothold, and chain the misconfigurations until something breaks. You get the full attack path, mapped to MITRE ATT&CK, with the exact fixes that break each link. ISO/IEC 27001:2022 certified delivery, named OSCP, CEH and CISSP consultants, across India, Singapore, UAE and Malaysia.
See Red Team and VAPT Services →Link 2: An Admin Function the UI Never Showed Us
Reading data is serious; controlling the account is worse. Continuing to map the API, we found endpoints that our low-tier account's interface never displayed, including one that managed user roles. The UI hid it, but the API still answered it, and it did not properly check that the caller was allowed to use it. This is broken function level authorization: hiding a function in the interface is not the same as protecting it on the server.
We also found an update endpoint that accepted fields it should have ignored. By including a role field in a request to update our own profile, a classic mass-assignment flaw, the server dutifully set it. In other words, we could ask to become an administrator, and the application said yes.
- Enumerate API endpoints beyond what the UI exposes; privileged functions are often present and only hidden client-side.
- Test for mass assignment: add fields like
role,is_adminortenant_idto update requests and see whether the server accepts them. - Function-level authorization must check the caller's role on the server for every sensitive action, not rely on the UI hiding the button.
Link 3: Admin Takeover and Full Export
With our self-granted administrator role, the application opened up. The admin tier exposed exactly what you would expect: user management, tenant-wide settings, and crucially a data-export function intended for legitimate administrators. We used it as designed, and exported the platform's customer data in full. The breach that started with changing one number in a URL ended with the entire database in our hands.
It is worth noticing that no step here was exotic. Each was a missing authorization check: on the object, on the function, on the fields. Web application security is, more than anything, the discipline of checking, on every request, that the authenticated user is actually allowed to do the specific thing they are asking to do. Miss that in one place and an attacker finds it; miss it in a chain and they walk straight to your database.
The Whole Chain
Three links, all the same root cause wearing different clothes:
- 1. Broken object level authorization (IDOR) let us read every tenant's data.
- 2. Broken function level authorization and mass assignment let us grant ourselves admin.
- 3. An admin export function let us take the whole database.
Not Sure Where Your Chain Starts?
Most compromises begin with something small: an anonymous share, a reused password, a writable script. On a free 30-minute call our lead will map the most likely first links in your environment and how we would test them.
Book a Free Scoping Call →What Should Have Fired an Alert
Even without perfect code, this chain is observable. The IDOR enumeration in link one produces a single account requesting a long run of sequential object ids across many tenants, a clear anomaly in application logs. The privilege change in link two is a high-value event: a low-tier account's role becoming admin should always alert. The bulk export in link three is exactly the kind of sensitive action that should be logged, rate-limited and reviewed.
Application and API logging, fed into a SIEM with a few targeted rules (sequential-id enumeration, self-service privilege changes, bulk data access), would have caught this before the export. Detection complements secure coding: you fix the authorization flaws, and you also watch for the behaviour that exploiting them produces, so a missed check does not become a silent breach.
Frequently Asked Questions
What is an IDOR vulnerability?
An insecure direct object reference (IDOR) is a flaw where an application exposes a reference to an object, such as an id in a URL or request, and fails to verify that the authenticated user is actually allowed to access that specific object. By changing the id, an attacker can read or modify other users' data. In the OWASP API Security Top 10 it is called broken object level authorization, and it is consistently the most common and most impactful web and API flaw.
How can one IDOR lead to a full data breach?
Through chaining. An IDOR first lets an attacker read other users' records. If the application also exposes privileged functions that are only hidden in the UI (broken function level authorization) or accepts fields it should ignore (mass assignment), the attacker can escalate to an administrator account. Admin access then unlocks bulk features such as data export. Each step is a separate missing authorization check, and together they turn reading one record into exporting the whole database.
What is the difference between object level and function level authorization?
Object level authorization checks that the user is allowed to access a specific object, for example that invoice 1041 belongs to them. Function level authorization checks that the user is allowed to perform a specific action at all, for example to call an admin-only endpoint. Both must be enforced server-side on every request. Broken object level authorization is the IDOR class; broken function level authorization is exposing privileged functions without checking the caller's role.
How do we prevent IDOR and authorization flaws?
Enforce authorization on every request, server-side, per object and per function: for each object a request references, confirm the caller owns or is permitted it; for each sensitive action, confirm the caller's role. Use strict allow-lists for writable fields to prevent mass assignment, never rely on the UI hiding a function, log and rate-limit privileged actions like exports, and test the application's API directly, which is where these flaws live and where attackers operate.
Why do scanners miss IDOR?
Because every request in an IDOR attack is technically well-formed and authenticated; nothing looks malformed or malicious to a scanner. Determining that a request should not be allowed requires understanding who owns which object and who should be able to do what, which is business-logic context a scanner does not have. Finding these flaws reliably needs a human tester reasoning about authorization, which is the core of a proper web and API penetration test.
Can Codesecure test our web application and API for these flaws?
Yes. Codesecure runs manual web and API penetration tests built around the OWASP Top 10 and OWASP API Top 10, focusing on the authorization and business-logic flaws, IDOR, broken function level authorization, mass assignment, that scanners miss and that cause real breaches. You get the attack path and the fix for each link. ISO/IEC 27001:2022 certified delivery with named OSCP, CEH and CISSP consultants across India, Singapore, UAE and Malaysia.
Can One Customer Reach Another in Your App?
Codesecure tests your web app and API the way an attacker does, chaining authorization flaws like IDOR to real data-breach impact, then hands you the fix at every link. Web and API pentest by named OSCP, CEH and CISSP consultants, ISO/IEC 27001:2022 certified, across India, Singapore, UAE and Malaysia.

