What Is IDOR? Insecure Direct Object Reference Explained

Share:
Learn what IDOR (Insecure Direct Object Reference) is, how attackers exploit it, how it maps to OWASP A01 and BOLA, and how to test for and prevent it.

Modern applications run on identifiers, since every invoice, patient record, payment, support ticket, and tenant workspace carries an ID that travels between the browser, the mobile app, and the API. When developers trust that ID without checking who is asking for it, a logged-in user can reach records that belong to someone else by changing a single number in a request.

This gap between authentication and authorization explains why access control failures keep topping vulnerability rankings, and why Insecure Direct Object Reference (IDOR) remains one of the most reported findings in web and API penetration tests.
This guide explains what IDOR is, how attackers exploit it, how security teams test for it, and which controls stop it.

What Is IDOR (Insecure Direct Object Reference)?

IDOR is an access control vulnerability that lets a user read, change, or delete another user’s data by manipulating an object identifier in a request. The identifier can be a database key, a file name, an account number, or a UUID passed in a URL, form field, header, or JSON body.

The flaw exists because the server confirms that the user is logged in but never confirms that the user owns or may access the requested object. A request such as /invoices/1042 becomes dangerous when changing it to /invoices/1043 returns a stranger’s invoice.

Authentication tells the application who the user is, while authorization decides what that user may touch, and IDOR is a failure of the second check.

How Does An IDOR Attack Work?

An IDOR attack works by replaying a legitimate request with a different object identifier and observing whether the server returns or modifies data it should protect. The attacker first logs in with a valid low-privilege account and captures normal traffic with a proxy tool.

They then look for parameters that reference objects, such as user IDs, order numbers, or document paths. Next, they swap the value for another user’s identifier and resend the request. If the response returns another person’s data, the attacker scripts the change across thousands of sequential IDs.

Joint guidance from CISA, NSA and the Australian Cyber Security Centre warns that these flaws are common, hard to prevent outside the development process, and easy to abuse at scale.

What Are The Common Types Of IDOR Vulnerabilities?

The common types of IDOR are grouped by what the attacker can do with the exposed reference and where that reference lives.

  • Horizontal IDOR: A user reaches records belonging to another user at the same privilege level, such as another customer’s orders.
  • Vertical IDOR: A standard user reaches objects reserved for administrators, which turns a data leak into privilege escalation.
  • Write-based IDOR: The attacker changes or deletes data, such as updating another user’s email address to hijack the account.
  • Static file IDOR: Documents like statements or medical reports are served from predictable paths without an ownership check.
  • Cross-tenant IDOR: In SaaS platforms, one customer reaches another customer’s workspace, which multiplies the blast radius.

Where Does IDOR Fit In The OWASP Top 10 And CWE?

IDOR falls under A01:2025 Broken Access Control, which holds the number one position in the current OWASP Top 10. OWASP reports that 100% of the applications in its dataset showed some form of broken access control, with 40 CWEs mapped to the category. IDOR appeared as a standalone OWASP entry from 2007 to 2013 before being merged into Broken Access Control in 2017. In MITRE’s catalog, IDOR maps primarily to CWE-639, Authorization Bypass Through User-Controlled Key.

The OWASP A01:2025 Broken Access Control page even uses an IDOR-style scenario, where changing an account parameter in the URL exposes another user’s account.

What Is The Difference Between IDOR, BOLA, And BFLA?

IDOR and Broken Object Level Authorization (BOLA) describe the same flaw, with BOLA being the name OWASP uses for APIs. BOLA has held the API1 position in the OWASP API Security Top 10 since the list launched in 2019, and it kept that spot in the OWASP API Security Top 10 2023 edition.

Broken Function Level Authorization (BFLA) is a related but separate weakness, where a user calls a function or endpoint reserved for a higher role. Both share the same root cause: authorization enforced in the user interface instead of on the server. In one Ampcus Cyber engagement, a fintech approval system hid manager and CTO actions in the frontend, yet its backend APIs lacked server-side checks.

Why Are IDOR Vulnerabilities So Dangerous For Enterprises?

IDOR vulnerabilities are dangerous because a single missing check can expose every record behind an endpoint, and exploitation needs no malware, phishing, or advanced tooling. Government advisories note that IDOR flaws have compromised the personal, financial, and health information of millions of people.

The business impact of these flaws extends well beyond the exposed data itself. Regulators under GDPR, HIPAA, PCI DSS, and India’s DPDP Act treat unauthorized access as a reportable breach, so one IDOR can trigger notification duties, fines, and litigation. IDOR traffic also looks like normal authenticated use, which means many security monitoring tools miss it until data appears on a leak site.

Write-based IDOR adds integrity risk, since attackers can alter payouts, approvals, or account settings.

How Do Security Teams Detect And Test For IDOR?

Security teams detect IDOR most reliably through manual, multi-account testing, because scanners cannot easily judge whether a response belongs to the right user. Testers create at least two accounts at each privilege level, map every endpoint that accepts an identifier, and replay each request using the other account’s session. Tools such as Burp Suite extensions help automate this swap, but a human still must confirm business impact. Code review should flag any query that fetches an object by ID without a matching ownership filter.

How Can Organizations Prevent IDOR Vulnerabilities?

Organizations prevent IDOR by enforcing an ownership or permission check on the server for every request that touches an object. Proven controls include:

  • Deny access by default and grant it only after verifying the user’s relationship to the requested record.
  • Centralize authorization logic in one reusable layer instead of repeating checks in each endpoint.
  • Scope database queries to the current user or tenant, so other records never load.
  • Use random identifiers such as UUIDs as defense in depth, while keeping the server-side check mandatory.
  • Log and alert on repeated access failures and rate-limit APIs to slow enumeration.
  • Add authorization test cases to CI/CD pipelines for every new endpoint.

A web application firewall can slow brute-force enumeration, although it cannot judge ownership, so the fix must live in application code.

Who Is Responsible For Fixing IDOR In An Organization?

Developers write the fix, although accountability for IDOR sits with security leadership, because the flaw reflects a missing authorization standard across the software lifecycle. CISOs should define a single access control model, require object-level checks in secure coding standards, and track authorization findings as a board-level risk metric. Product owners should treat cross-user and cross-tenant data access as release blockers. Treating IDOR as a governance problem stops the same defect from reappearing with every new API.

Find and fix IDOR before attackers do with Ampcus Cyber’s application and API penetration testing experts.

People Also Ask

What is an example of an IDOR vulnerability?

Is IDOR the same as BOLA?

Do UUIDs prevent IDOR?

Can a WAF stop IDOR attacks?

Is IDOR a critical vulnerability?

Can automated scanners find IDOR?

Enjoyed reading this blog? Stay updated with our latest exclusive content by following us on Twitter and LinkedIn.

Contact Us