What Is IDOR? Insecure Direct Object Reference Explained

ObaidaAlsulaiman

Obaida Al-Sulaiman, Information Security Manager at ScanTitan,

What Is IDOR? Insecure Direct Object Reference Explained
Table of Contents
Insecure Direct Object Reference (IDOR) is an access control vulnerability in which an application uses a user-controllable reference to retrieve, change, delete, or otherwise act on an object without verifying that the requester is authorized to perform that action on that specific object.The central mistake is confusing authentication with authorization. Authentication answers “Who are you?” Authorization answers “What are you allowed to do?” Object-level authorization goes one step further: “Can this user perform this action on this exact account, invoice, document, order, project, file, or API resource?” IDOR appears when that last decision is missing or incorrect.

Classification noteMITRE commonly maps IDOR-style authorization bypasses to CWE-639: Authorization Bypass Through User-Controlled Key. In the OWASP Top 10:2025, insecure direct object references are covered under A01: Broken Access Control. For APIs, the OWASP API Security Top 10:2023 places Broken Object Level Authorization (BOLA) at API1.

What Is IDOR (Insecure Direct Object Reference)?

Insecure Direct Object Reference (IDOR) is an access control vulnerability in which an application exposes or accepts a reference to an object without properly verifying that the requester is authorized to access or modify that specific object. IDOR occurs when a user-controlled reference—such as a numeric ID, UUID, account number, filename, slug, token, database key, or other resource identifier—is used to select an object, but the server does not enforce the correct object-level authorization check. IDOR is therefore not caused simply by placing an ID in a URL. Direct object references are common and often necessary. The vulnerability exists when the application trusts the supplied reference without confirming that the current user is permitted to perform the requested action on the referenced resource.

Element Role in IDOR
Object The resource being accessed, such as an account, invoice, order, document, message, file, project, or API record
Reference The value used to select that object, such as an ID, UUID, slug, filename, account number, or resource key
Authorization rule The policy that determines whether the current user may read, update, delete, share, approve, or otherwise act on the selected object
Authorization failure The server retrieves or changes the object without correctly enforcing the required ownership, role, tenant, or policy relationship

A useful way to model IDOR is: actor + object + action → authorization decision. The same user may be authorized to read one project but not another, update an object but not delete it, or access resources only inside the user’s own organization.

IDOR belongs to the wider family of cyber security vulnerabilities known as broken access control. Being logged in does not make every valid object identifier accessible to the current account.

How Does an IDOR Vulnerability Work?

How Does an IDOR Vulnerability Work?

An IDOR vulnerability works when an authenticated user changes a reference to an application object and the server accepts the new reference without checking whether that user is authorized to access or modify the referenced object.

A typical IDOR attack follows these steps:

  1. The user accesses an object they are legitimately allowed to use:
    For example, a logged-in customer opens their own invoice, order, profile, document, or API resource.
  2. The application exposes or sends an object reference:
    The request contains a value that identifies the resource, such as a numeric ID, UUID, account number, filename, slug, or API object identifier.
  3. The requester changes the object reference:
    The user replaces their own object identifier with the identifier of another object while keeping the same authenticated session.
  4. The modified request is sent to the server:
    The server resolves the new identifier and finds the referenced object.
  5. The server fails to enforce object-level authorization:
    It verifies that the user is logged in, or simply retrieves the object, but does not verify whether that user is allowed to access or perform the requested action on that specific resource.
  6. The unauthorized action succeeds:
    The application may return another user’s data or allow the requester to update, delete, download, share, or otherwise act on an object they should not control.

For example, a customer may legitimately access:

GET /api/invoices/4812

If they change the reference to:

GET /api/invoices/4813

and invoice 4813 belongs to another customer, the server should reject the request. If it returns the invoice because it checked only that the requester was authenticated and not whether they were authorized for invoice 4813, the endpoint is vulnerable to IDOR.

The authorization check is the critical stepA changed identifier alone does not create IDOR. The vulnerability exists when the changed reference leads to access or an action that violates the application’s intended authorization policy.

IDOR Vulnerability Example

A simple IDOR example is an invoice page that loads a record based on an identifier in the request but checks only whether the requester is logged in.

Suppose User A legitimately opens this resource:

/account/invoices/4812

Invoice 4812 belongs to User A. If the application also returns invoice 4813 after the reference is changed, even though invoice 4813 belongs to User B, the server has failed to enforce object-level authorization.

The important sequence is:

Authentication succeeds → object lookup succeeds → ownership or permission check fails or never occurs → unauthorized object is returned.

IDOR is not limited to reading data. The same failure can affect state-changing operations. For example, an update request that accepts an order or project ID may allow one user to modify another user’s resource if the backend does not validate ownership or permission before applying the change.

Not every changed ID is IDOR

If the second object is intentionally public or shared with the requester, returning it is not an authorization failure. A finding becomes meaningful when the application violates the expected access policy for that actor, object, and action.

Where Can IDOR Vulnerabilities Appear?

IDOR can appear anywhere user-controlled data identifies an application object, not only in sequential numbers placed in URLs.

Location Typical Object Reference Example Resource
URL path Numeric ID, UUID, slug User profile, order, invoice, project
Query parameter invoice_id, account, document Reports, account details, downloads
Form field Record ID or owner ID Profile update, ticket edit, approval workflow
Hidden input Internal object key Billing profile, order, workflow item
JSON request body project_id, user_id, tenant_id REST or GraphQL API object
HTTP header Organization or resource selector Tenant-specific API data
Filename or object key Report name, storage key, export ID Private file, statement, generated report

That means a UUID can be a direct object reference just as easily as the number 123. The identifier format changes how easy an object is to discover; it does not determine whether access is authorized.

What Is the Risk of IDOR?

The risk of IDOR is unauthorized access to, modification of, or destruction of objects that belong to another user, role, or tenant. Depending on the affected resource and operation, an IDOR vulnerability can expose sensitive data, allow unauthorized changes, cause data loss, enable privilege escalation, or contribute to account takeover.

The impact is not the same for every IDOR vulnerability. It depends on what object is exposed, what action the requester can perform, whose privileges are affected, and whether the flaw can be repeated across many objects. OWASP notes that authorization failures can affect the confidentiality, integrity, and availability of protected resources, with business impact ranging from limited to severe depending on the sensitivity of the resource.

IDOR Risk What Can Happen
Sensitive data exposure An unauthorized user may read another user’s invoices, messages, documents, account details, records, files, or other private data.
Unauthorized modification An attacker may alter another user’s profile, order, project, settings, workflow data, or other application objects.
Unauthorized deletion A broken object-level authorization check may allow another user’s documents, records, projects, or other resources to be deleted.
Horizontal privilege escalation A user gains access to resources belonging to another user at a similar privilege level, such as one customer viewing another customer’s invoice.
Vertical privilege escalation An object-reference flaw may expose resources or actions associated with a more privileged user or role.
Account takeover In some applications, unauthorized access to security-sensitive objects or account-management functions can contribute to full account takeover.
Cross-tenant exposure In multi-tenant applications, a user from one organization may gain access to data or resources belonging to another customer or tenant.
Large-scale exposure If the same authorization failure can be repeated across many object references, a single IDOR flaw can expose or alter large numbers of records.

Horizontal vs Vertical Privilege Escalation in IDOR

Horizontal privilege escalation: occurs when a user accesses an object belonging to another user at roughly the same privilege level. This is the classic IDOR scenario—for example, Customer A changing an invoice ID and gaining access to Customer B’s private invoice.

Vertical privilege escalation: occurs when an authorization flaw gives a lower-privileged user access to objects or actions associated with a more privileged account. IDOR can contribute to vertical escalation, but not every vertical access-control vulnerability is IDOR; the defining feature is still an insecure object reference combined with missing or incorrect object-level authorization.

How Does the Requested Action Change the Risk?

The risk increases when IDOR allows more than unauthorized reading. Object-level authorization should be checked independently for every operation because permission to view an object does not automatically grant permission to update, delete, share, export, approve, or administer it.

For example, an application may intentionally allow team members to read a shared project while restricting who can edit or delete it. If the read check is correct but the update or delete endpoint does not enforce the same policy, the application can still contain an IDOR vulnerability.

IDOR vs BOLA: What Is the Difference?

IDOR and BOLA describe closely related object-level authorization failures, but BOLA is the broader API-security term. IDOR traditionally describes insecure direct references in web applications and APIs, while Broken Object Level Authorization focuses on whether an API enforces authorization whenever a client supplies an object identifier.

An IDOR is therefore a common way BOLA manifests in an API: the client supplies an object reference, the API resolves it, and the API fails to verify whether the caller is allowed to perform that action on the object.

Question IDOR BOLA
Full name Insecure Direct Object Reference Broken Object Level Authorization
Common context Web applications and APIs APIs
Core failure Object reference is accepted without sufficient authorization Object-level authorization is missing or incorrect
Typical identifier locations URLs, parameters, form fields, filenames, request bodies Path/query parameters, headers, API request payloads
OWASP context A01:2025 Broken Access Control API1:2023 Broken Object Level Authorization

OWASP notes that API object identifiers can be sequential integers, UUIDs, or generic strings and may appear in a request path, query string, header, or payload. Regardless of identifier type, the server still needs to authorize the requested object-level action.

Is IDOR in the OWASP Top 10?

Yes. IDOR is included in the OWASP Top 10:2025 under A01: Broken Access Control. It is not listed as a separate standalone category, because IDOR is one form of broken access control in which an application fails to verify whether a user is authorized to access or modify a specific object.

OWASP gives this exact type of failure as an example of broken access control: a user can view or edit another person’s account simply by supplying that account’s unique identifier. This is the core pattern behind many IDOR vulnerabilities.

For APIs, the same authorization problem is represented more explicitly in the OWASP API Security Top 10 as API1:2023 — Broken Object Level Authorization (BOLA). BOLA and IDOR overlap closely because both involve missing or incorrect authorization checks on individual objects.

Do UUIDs Prevent IDOR?

No. UUIDs can make object identifiers harder to guess, but they do not prevent IDOR because authorization must still be enforced independently.

A sequential ID such as 4812 may be easy to enumerate. A UUID is much harder to guess. That can reduce opportunistic discovery, but an identifier can still be exposed through links, application responses, logs, shared objects, browser history, APIs, client-side state, or other workflows.

Identifier Design What It Helps With What It Does Not Solve
Sequential numeric ID Simple implementation Easy enumeration and no authorization protection
UUID / random identifier Reduces guessing and enumeration Does not prove ownership or permission
Opaque object key Can reduce direct exposure of internal database keys Still requires server-side authorization

The rule is simple: identifier secrecy is defense in depth; authorization is the security boundary.

How to Find IDOR Vulnerabilities

How to Find IDOR Vulnerabilities

Find IDOR by identifying object references and verifying whether the server rechecks authorization when the user, role, tenant, object, or requested action changes. The safest and most reliable approach uses authorized test accounts and known test objects so the expected access policy is clear.

  1. Identify object references: Review URL paths, query parameters, form fields, hidden inputs, JSON bodies, request headers, filenames, and API resource identifiers.
  2. Define the expected authorization rule: Determine who should be allowed to read, update, delete, share, approve, export, or administer each object.
  3. Use controlled identities: Create test users that represent different owners, roles, teams, and tenants so access decisions can be compared safely.
  4. Change only the object reference: Keep the request otherwise comparable and verify whether the server reevaluates authorization for the newly referenced resource.
  5. Test actions separately: A correct read check does not prove that update, delete, export, share, or administrative operations are protected.
  6. Confirm the resource is actually restricted: Public or intentionally shared objects should not be reported as IDOR simply because another user can access them.
  7. Check tenant boundaries: In SaaS applications, verify that users cannot cross organization or workspace boundaries even when they know a valid object identifier.

Testing rule

An exposed identifier is not automatically a vulnerability. A changed identifier returning another valid object is not automatically a vulnerability either. The evidence becomes meaningful when the application grants access or performs an action that violates the intended authorization policy.

For APIs, start from a complete endpoint inventory and known authorization model. ScanTitan’s guide on how to scan an API for vulnerabilities explains why API testing needs specifications, authenticated context, methods, headers, and request bodies rather than ordinary website crawling alone.

How to Prevent IDOR

Prevent IDOR by enforcing server-side object-level authorization for every requested object and every operation before the application reads, modifies, deletes, exports, shares, or acts on that resource. Do not rely on hidden IDs, front-end restrictions, unpredictable URLs, or the fact that a user is already authenticated.

1. Enforce Object-Level Authorization on Every Request

Every sensitive object request should evaluate the current actor, the target object, and the requested action. A user who is allowed to read one invoice should not automatically be authorized to read all invoices, and permission to view an object should not automatically grant permission to update or delete it.

Authorization must be enforced in trusted server-side code or a server-side policy layer. Hiding a button, removing a link, or filtering objects only in client-side JavaScript does not prevent a direct request from reaching the backend.

2. Scope Object Queries to Authorized Resources

Where possible, retrieve objects through the set of resources the current user or tenant is already allowed to access rather than looking up any object globally and trusting that the request is legitimate.

find requested object within current user's permitted resources

OWASP’s IDOR prevention guidance recommends this scoped-query approach because it makes the authorization relationship part of the data-access path.

3. Centralize Authorization Policies

Use reusable framework policies, middleware, authorization services, or domain-level access-control components instead of scattering permission checks across many controllers and endpoints. Centralization reduces the chance that one new route or API method omits a required object-level check.

4. Deny Access by Default

When the application cannot establish that an actor is permitted to perform an action on an object, deny the request. Access should be granted through explicit policy, not inferred from possession of a valid identifier.

5. Enforce Tenant and Ownership Boundaries

Multi-tenant applications need to validate more than user identity. The server should confirm that the object belongs to a tenant, organization, workspace, or customer context the current user is permitted to access.

A valid relationship often looks like user → role or membership → tenant → object → allowed action.

6. Authorize Every Object Action Separately

Do not assume that one authorization check covers an object’s full lifecycle. Read, update, delete, share, export, approve, transfer, and administrative actions can require different permissions. A secure GET handler does not prove that PATCH or DELETE applies the same policy.

7. Use UUIDs or Random References Only as Defense in Depth

Complex identifiers can reduce enumeration and make bulk guessing less practical, but they should be added after authorization is correct. The backend must make the same access decision whether the identifier is 42, a UUID, a slug, or an opaque storage key.

8. Test Authorization Continuously

Include negative authorization cases in unit and integration tests: users should be tested not only for what they can access, but also for what they must be denied. API security testing should use identities from different roles and tenants and retest access-control rules after changes to routes, policies, object ownership, or authentication flows.

For broader testing methodology, see ScanTitan’s guide to API security testing.

How Does IDOR Affect APIs and Multi-Tenant Applications?

IDOR affects APIs and multi-tenant applications when a client supplies an object or tenant identifier and the server uses that identifier without verifying that the authenticated user is authorized to perform the requested action on that specific resource. In an API, this can expose another user’s object. In a multi-tenant application, the same failure can cross an organization or customer boundary and expose resources belonging to another tenant.

APIs are particularly exposed to this class of authorization failure because object identifiers are routinely supplied by clients in URL paths, query parameters, request headers, or request bodies. OWASP classifies this API-specific problem as API1:2023 — Broken Object Level Authorization (BOLA).

For example, an API may legitimately expose operations such as:

GET    /api/projects/{id}
PATCH  /api/orders/{id}
DELETE /api/documents/{id}

The identifier tells the API which object the client wants to use; it should not determine whether the client is allowed to use it. Before completing the request, the server must verify the relationship between the authenticated actor, the requested object, and the requested action.

For example, if User A is allowed to access project 123, changing the request to project 124 should trigger a new authorization decision. If project 124 belongs to User B and the API returns or modifies it simply because the identifier is valid, the endpoint has broken object-level authorization.

How Does IDOR Create Cross-Tenant Access?

In a multi-tenant application, IDOR can create cross-tenant access when the server trusts a client-supplied tenant or resource identifier without confirming that the current user belongs to the tenant that owns the requested object.

A SaaS application may have a relationship such as:

authenticated user → tenant membership → requested object → requested action

Each relevant relationship must be enforced on the server. A valid object ID or tenant ID is only a selector; it is not proof that the requester is authorized to use that resource.

Request Situation Required Authorization Decision What Goes Wrong in IDOR/BOLA
User requests their own object Verify the user is allowed to perform the requested action on the object No issue if the policy allows the action
User requests another user’s object Verify ownership, sharing, role, or another policy that permits access The API returns or changes the object merely because its ID is valid
User requests an object from another tenant Verify that the user’s server-confirmed tenant context permits access to that object’s tenant The application trusts a client-supplied tenant or resource ID and crosses the tenant boundary
Privileged user performs a cross-tenant action Verify that an explicit administrative policy permits that specific cross-tenant operation Broad privileges or an unscoped lookup expose resources outside the administrator’s intended scope

This is why multi-tenant authorization cannot be reduced to “logged in” versus “not logged in.” The server may need to evaluate identity, tenant membership, object ownership or sharing, role, and requested action before allowing access.

Random or opaque object IDs can make resources harder to enumerate, but they do not solve this problem. The security boundary is the server-side authorization decision, not the difficulty of guessing the identifier.

For broader controls around API authentication, authorization, endpoint inventory, and continuous testing, see ScanTitan’s REST API security guide.

Can Vulnerability Scanners Detect IDOR?

Vulnerability scanners can detect some IDOR patterns, but IDOR is difficult to confirm automatically because correct authorization depends on relationships between users, roles, tenants, objects, and allowed actions.

A scanner may see a 200 OK response after an object identifier changes, but status code alone cannot answer the business question: “Should this user have been allowed to access this object?” High-confidence testing therefore needs authenticated context and, for many applications, more than one identity.

Method What It Can Reveal Main Limitation
Authenticated DAST Protected routes, object parameters, API calls, and runtime authorization behavior One account may not reveal cross-user or cross-tenant policy failures
Multi-user differential testing Differences when the same object/action is requested by different identities Requires reliable knowledge of which user owns which object
API security testing Object IDs in paths, bodies, headers, and methods across documented endpoints Business ownership and sharing rules may not be machine-readable
SAST / code review Missing authorization calls, unsafe global lookups, inconsistent policy use May not capture runtime role, tenant, or data relationships
Manual testing Complex ownership, role, workflow, and cross-tenant authorization failures Slower and requires application-specific context

How Strong Is the Evidence for an IDOR Finding?

Observed Behavior Interpretation
Object identifier is exposed Normal application behavior; not an IDOR finding by itself
Changing the reference returns another valid object Suspicious, but the object may be intentionally public or shared
Different user’s private object is returned Strong evidence of broken object-level authorization
Unauthorized update, delete, approval, or other action succeeds High-confidence authorization failure with direct business impact

Because meaningful IDOR testing usually happens behind login, an authenticated scan can reach routes and API operations that an anonymous scan cannot. Complex authorization still benefits from human validation, which is one reason vulnerability scanning and penetration testing remain complementary.

ScanTitan’s Website Vulnerability Scanner can test web applications and APIs for runtime security weaknesses and authenticated attack surface, while deeper multi-user authorization logic may require additional manual validation.

Authentication vs Authorization vs IDOR

Authentication verifies identity, authorization determines permissions, and IDOR is an authorization failure involving access to a specific object through a controllable reference.

Concept Question It Answers
Authentication Who are you?
Authorization What are you allowed to do?
Object-level authorization Can you perform this action on this specific object?
IDOR What happens when the object-level authorization decision is missing or incorrect?

This distinction matters because many IDOR vulnerabilities exist in applications with perfectly functional login systems. The user is correctly authenticated; the failure happens afterward when the server decides what that authenticated identity may access.

Frequently Asked Questions

What is an IDOR vulnerability?

An IDOR vulnerability is a broken access-control flaw where an application uses a user-controllable object reference without verifying that the requester is authorized to access or modify the referenced object.

What does IDOR stand for?

IDOR stands for Insecure Direct Object Reference. It describes an authorization failure involving a direct reference to an application object such as an account, invoice, file, order, document, project, or API resource.

What is IDOR in cyber security?

In cyber security, IDOR is a type of broken access control. A user supplies or changes an object identifier and the application fails to verify whether that user is allowed to perform the requested action on the selected object.

Can you provide an example of an IDOR vulnerability?

Yes. If a logged-in user can change an invoice identifier in a request and retrieve another customer’s private invoice because the server checks only authentication and not invoice ownership, the endpoint has an IDOR-style object-level authorization flaw.

What is an IDOR account ID?

There is no special security object called an “IDOR account ID.” An account ID is simply one possible object reference. It becomes relevant to IDOR when the application accepts that ID without verifying that the current user is authorized to access the referenced account.

How do you avoid IDOR?

Prevent IDOR by enforcing server-side object-level authorization on every operation, scoping object queries to resources the current user or tenant may access, denying access by default, centralizing authorization policies, and testing negative access cases continuously.

Do UUIDs prevent IDOR?

No. UUIDs make identifiers harder to guess, which can reduce enumeration, but they do not prove authorization. The server must still verify that the current user may access or modify the referenced object.

Is IDOR part of the OWASP Top 10?

Yes. In the OWASP Top 10:2025, IDOR is covered under A01: Broken Access Control rather than appearing as a standalone category. In the OWASP API Security Top 10:2023, the closely related Broken Object Level Authorization category is API1.

What is the difference between IDOR and BOLA?

IDOR focuses on insecure use of a direct object reference without sufficient authorization, while BOLA is the broader API-security term for missing or incorrect authorization at the individual object level. IDOR is a common way BOLA appears in APIs.

Can a vulnerability scanner detect IDOR?

Some IDOR patterns can be detected with authenticated DAST, API testing, and multi-user differential testing, but complex authorization often requires business context or manual validation because a scanner may not know which users, tenants, objects, and actions are supposed to be related.

o

Information Security Manager · Dubai, UAE · 12+ years InfoSec experience

Obaida specialises in web application security, vulnerability management, and external attack surface reduction for SMB and mid-market organisations. All ScanTitan content is reviewed against live scan findings before publication.

Share :

Facebook
LinkedIn

Continue reading