GO KALI FREE
IntermediateWeb Security

What Is IDOR? Insecure Direct Object Reference Examples & How to Prevent IDOR Attacks

What is IDOR? See real insecure direct object reference examples, a worked lab test with Burp Suite, and how to prevent IDOR with server-side checks.

#what is idor#how to prevent idor#idor attack#idor vulnerability#idor examples#idor vs bola#insecure direct object reference#web security

What Is IDOR?

Insecure Direct Object Reference (IDOR) is a web vulnerability that lets one user read, change, or delete another user's data by changing an object identifier — a user ID, invoice number, or file name — in a request the application never checks. It is an authorization failure, not an authentication failure: the attacker is logged in, but the application never verifies that the logged-in user is allowed to touch that specific object.

You change a number in the URL: /user/profile/123 to /user/profile/124. The page loads another user's name, email, and billing details. No password prompt, no error — just someone else's private data. This is IDOR: the app exposes internal object references (user IDs, invoice numbers, file paths) without checking whether the current user is authorized to access them.

IDOR is one of the most commonly reported web vulnerabilities in bug-bounty programs, and it sits at the heart of the OWASP Top 10. In the OWASP Top 10:2021 and the 2025 edition, Broken Access Control (A01) holds the number one spot, and IDOR is its classic example. In the OWASP API Security Top 10:2023, the same flaw is called BOLA — Broken Object Level Authorization (API1:2023) — and it is also number one. A joint advisory from the ACSC, CISA, and NSA (AA23-208A, July 27, 2023) warned that IDOR flaws are among the most routinely exploited access-control weaknesses. The flaw is old, well understood, and still everywhere — because it is a missing check, not a clever exploit, and a missing check is easy to leave out of one endpoint among hundreds.

The three ingredients

The OWASP IDOR Prevention Cheat Sheet describes three ingredients, and removing any one of them breaks the attack:

  • An object — an account, document, support ticket, invoice, photo, or transaction.
  • A reference to that object — an ID, UUID, account number, token, or slug that the client can see and change.
  • A missing object-level authorization check — the server never asks "may this user access this object?"
  • Remove the third ingredient and the first two are harmless. That is the most important point in this guide: IDOR is not caused by exposing IDs. It is caused by not checking them.

    Authentication is not authorization

    A common misunderstanding is that login protects data. It does not. Authentication answers "who are you?" Authorization answers "may you do this to this object?" An application can have perfect login and still be wide open to IDOR, because every logged-in user passes authentication — and then the application hands over whatever object the request names. IDOR is the gap between those two questions.

    Prerequisites

    Before studying IDOR, you should understand:

  • Web Security Fundamentals — HTTP requests, authentication vs authorization
  • REST API Basics — URL structure, resource identifiers
  • Database Concepts — Primary keys, object references
  • Burp Suite Introduction — Intercepting and modifying requests
  • If any of those are new, read our Web Security Fundamentals guide first, then come back — the worked example below uses Burp Suite's Repeater, which that guide and our Burp Suite Introduction both cover.

    How IDOR Works

    Applications use identifiers to reference objects:

  • Numeric IDs: /user/profile?id=1234
  • UUIDs: /invoice/download?ref=a1b2c3d4
  • Usernames: /documents/owner=jane
  • Sequential numbers: /order/confirm/5678
  • Slugs and file paths: /files/report-2026.pdf, /tickets/TCK-1042
  • Every identifier the client can see is an identifier the client can change. The server receives a request, looks up the object by that identifier, and returns it — unless a check intervenes.

    The vulnerable pattern

    // Vulnerable — no authorization check
    app.get('/api/invoices/:id', (req, res) => {
      const invoice = db.invoices.findById(req.params.id);
      res.json(invoice);
    });
    

    The attacker simply changes the ID:

    GET /api/invoices/1001  ->  User's own invoice
    GET /api/invoices/1002  ->  Another user's invoice (IDOR!)
    

    Nothing about the second request looks suspicious. It is a well-formed, authenticated request for an existing object. The only thing wrong is that the user asking for invoice 1002 does not own it — and nobody checked.

    Where identifiers hide

    IDOR is not only about URLs. Object references appear in many places, and testers must check all of them:

    LocationExampleWhat to change
    URL path/api/users/123The number in the path
    Query string/download?file=report-1234.pdfThe file name or ID
    POST body{"user_id": 123, "action": "view"}The user_id field
    JSON API field{"invoice_id": 1002}The invoice_id value
    HTTP headerX-Account-Id: 123The header value
    Cookieaccount=123The cookie value
    JWT claim"sub": "123" (unsigned change is not possible, but a stale or over-broad token may carry another user's ID)The claim, if the token is forgeable or misissued

    The pattern is always the same: the client supplies an identifier, the server trusts it, and no ownership check runs.

    Types of IDOR

    Horizontal IDOR

    Accessing resources at the same privilege level but belonging to another user — viewing another user's private messages, invoices, or medical records. This is the most common form, and the one most bug-bounty reports describe.

    Vertical IDOR (Privilege Escalation)

    Accessing resources requiring higher privileges — a regular user accessing an admin endpoint, such as changing /api/users/123/role from user to admin, or calling an admin-only export endpoint with their own low-privilege session. Vertical IDOR can lead to full privilege escalation.

    File-Based IDOR

    GET /download?file=user_1234_report.pdf
    GET /download?file=user_5678_report.pdf
    

    Download endpoints are a classic IDOR location: the file name is the reference, and the server streams whatever file is named. The same flaw appears in profile-picture uploads, document previews, and backup downloads.

    API IDOR (BOLA)

    In APIs, the same flaw is called Broken Object Level Authorization. A REST endpoint such as GET /api/v1/orders/4821 that returns any order to any authenticated caller is BOLA. Because APIs expose dozens of object endpoints, a single missing check can expose an entire data set — and because APIs return structured data, the exposure is easy to automate.

    TypeAttacker gainsTypical targetSeverity
    Horizontal IDORAnother user's data at the same levelProfiles, invoices, messages, photosHigh
    Vertical IDORHigher-privilege functions or dataAdmin panels, role changes, exportsCritical
    File-based IDORAnother user's filesDocuments, reports, backupsHigh
    API IDOR / BOLAAny object the API servesOrders, accounts, records, filesHigh to Critical

    IDOR vs BOLA

    IDOR and BOLA describe the same flaw in different contexts. IDOR is the older, web-application term from the OWASP Top 10; BOLA is the API term from the OWASP API Security Top 10:2023, where it ranks API1 — the most common API vulnerability.

    AspectIDORBOLA
    ContextWeb applications (browser flows)APIs (REST, GraphQL)
    ReferenceURL, form field, cookiePath parameter, JSON body field
    OWASP listTop 10:2021/2025 A01 Broken Access ControlAPI Security Top 10:2023 API1
    Root causeMissing object-level authorizationMissing object-level authorization
    FixServer-side ownership check on every requestServer-side ownership check on every request

    If you can test for IDOR in a web app, you can test for BOLA in an API — the workflow is identical, only the transport changes. Our API Hacking Guide covers BOLA testing in depth, including GraphQL and JWT contexts.

    Worked Example: Finding and Fixing IDOR in a Local Lab

    Everything below runs against a local Flask document API with two test users (alice and bob) and four documents, deliberately missing the ownership check. Run it only on your own machine, never against a real site.

    Step 1 — Build the vulnerable lab app

    # lab_app.py — DELIBERATELY VULNERABLE, local lab only
    from flask import Flask, request, jsonify
    
    app = Flask(__name__)
    
    DOCUMENTS = {
        1: {"id": 1, "owner": "alice", "title": "Alice tax return", "body": "Salary: 52000"},
        2: {"id": 2, "owner": "alice", "title": "Alice contract", "body": "Signed 2026-01-15"},
        3: {"id": 3, "owner": "bob", "title": "Bob medical note", "body": "Appointment 2026-02-02"},
        4: {"id": 4, "owner": "bob", "title": "Bob bank letter", "body": "Account ending 4417"},
    }
    
    @app.route("/api/documents/<int:doc_id>")
    def get_document(doc_id):
        # VULNERABLE: no ownership check — any logged-in user gets any document
        doc = DOCUMENTS.get(doc_id)
        if not doc:
            return jsonify({"error": "not found"}), 404
        return jsonify(doc)
    
    if __name__ == "__main__":
        app.run(host="127.0.0.1", port=5000)
    
    pip install flask
    python3 lab_app.py
    

    Step 2 — Log in as alice and capture a request

    Log in to the lab app as alice in the browser with Burp Suite intercepting. Open document 1. Burp captures:

    GET /api/documents/1 HTTP/1.1
    Host: 127.0.0.1:5000
    Cookie: session=alice-session-token
    

    The response is alice's own document — expected and legitimate.

    Step 3 — Change the ID in Repeater

    Send the request to Burp Repeater and change the ID from 1 to 3:

    GET /api/documents/3 HTTP/1.1
    Host: 127.0.0.1:5000
    Cookie: session=alice-session-token
    

    Illustrative response:

    {"id": 3, "owner": "bob", "title": "Bob medical note", "body": "Appointment 2026-02-02"}
    

    Alice just read bob's medical note. That is IDOR — confirmed in one changed number.

    Step 4 — Enumerate with Intruder

    To show the scale, send the request to Burp Intruder with the ID as the payload position and a numeric range of 1–100. Every ID that returns 200 is an accessible document. In a real application with sequential IDs, this is how one missing check becomes a full data breach: the attacker iterates through all IDs and downloads every record.

    # Same check from the terminal, for the record
    curl -s -b "session=alice-session-token" http://127.0.0.1:5000/api/documents/3 | jq .
    

    Step 5 — Apply the fix

    The fix is a server-side ownership check on every request:

    # FIXED: check ownership before returning the document
    @app.route("/api/documents/<int:doc_id>")
    def get_document_fixed(doc_id):
        current_user = request.cookies.get("session", "").replace("-session-token", "")
        doc = DOCUMENTS.get(doc_id)
        if not doc:
            return jsonify({"error": "not found"}), 404
        if doc["owner"] != current_user:
            return jsonify({"error": "not found"}), 404
        return jsonify(doc)
    

    Two details matter. First, the check runs on the server, on trusted code the client cannot modify. Second, the fixed version returns 404 for both missing and not-owned documents, so an attacker cannot tell whether document 3 exists — there is no existence oracle leaking information.

    Step 6 — Re-test and confirm

    Repeat Step 3 against the fixed app. Alice requesting document 3 now receives:

    HTTP/1.1 404 Not Found
    {"error": "not found"}
    

    The same request that exposed bob's data now returns nothing. Turn this two-account test into a regression test: every object endpoint should have a test where user A requests user B's object and expects a 403 or 404. If that test ever passes the wrong way, the build fails.

    How to Prevent IDOR Attacks

    Prevention is an architecture rule, not a per-endpoint scramble. The OWASP guidance and the worked example above both point to one rule: verify authorization on the server for every object, every time. Everything else is defense in depth.

    The 7-layer prevention checklist

  • Server-side object-level authorization on every request. Check that the requester may perform this action on this object — read, update, delete, export, and every HTTP method. This is the one required control; without it, nothing else matters.
  • Scope data access to the user or tenant. Query only records the user can reach, so other records are never loaded. For example, look up the invoice through the current user's invoices, not through all invoices.
  • Deny by default. Any object or function without an explicit rule is refused. Start each request with no access and grant it only when an explicit rule allows it.
  • Centralized authorization policy. One middleware, policy engine, or data-layer filter enforces the rules everywhere. This prevents the "one endpoint forgot" problem that causes most real IDORs.
  • Identity from the session, not the client. The server ignores user_id or tenant_id values sent by the client for the caller's own actions. Take identity from the session.
  • Indirect reference maps. Map a per-user or per-session reference (1, 2, 3 in the user's own list) to the real ID on the server, so clients never pass the raw key.
  • Random, non-sequential IDs (UUIDs) as defense in depth. UUIDs make enumeration much harder, but they never substitute for authorization — if an attacker obtains a valid UUID from an API response, a log, or a leak, the endpoint must still block them.
  • Prevention in code

    The vulnerable Express handler from the "How IDOR Works" section becomes safe with two additions — authentication middleware and an ownership check:

    app.get('/api/invoices/:id', authenticate, (req, res) => {
      const invoice = db.invoices.findById(req.params.id);
      if (!invoice) return res.status(404).send('Not found');
    
      if (invoice.userId !== req.user.id) {
        return res.status(403).send('Forbidden');
      }
    
      res.json(invoice);
    });
    

    Better still, scope the query so the unauthorized record is never loaded:

    // Scoped query — the invoice must belong to the current user
    const invoice = db.invoices.findOne({
      where: { id: req.params.id, userId: req.user.id }
    });
    if (!invoice) return res.status(404).send('Not found');
    

    Use indirect references

    app.get('/my/invoices/:ref', authenticate, (req, res) => {
      const invoiceId = sessionInvoiceMap[req.session.id][req.params.ref];
      if (!invoiceId) return res.status(404).send('Not found');
      const invoice = db.invoices.findById(invoiceId);
      res.json(invoice);
    });
    

    Use unpredictable identifiers — as defense in depth only

    CREATE TABLE invoices (
      id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
      user_id INTEGER REFERENCES users(id)
    );
    

    Note: Unpredictable IDs are obfuscation, not security. Always pair with authorization.

    Framework support

    FrameworkWhat it offersWhat you must still do
    Express (Node.js)Middleware pattern; no built-in object authorizationWrite authorization middleware and apply it to every object route
    DjangoObject-level permissions via django-guardian; get_object_or_404 with owner filterScope every queryset to the current user
    LaravelPolicies and Gates; route-model binding with authorize()Define a policy per model and call it on every action
    Ruby on RailsPundit / CanCanCan gems; scoped finds (@current_user.projects.find)Scope every lookup to the current user, as the OWASP cheat sheet shows
    Spring BootSpring Security method security (@PreAuthorize)Write ownership expressions per endpoint; test with two accounts

    No framework prevents IDOR by default. Every one of them requires the developer to add the ownership check — which is exactly why the flaw keeps appearing.

    Authorization tests in CI

    Turn every IDOR finding into a regression test. A two-account test suite should run on every build: for each object endpoint, user A requests user B's object and the test expects a 403 or 404. If a future change drops a check, the build fails before the code ships.

    Logging, alerting, and rate limits

    Log access-control failures and alert on enumeration patterns — a single account requesting many sequential IDs, or bursts of 403 and 404 responses, is a strong IDOR-probing signal. Rate limits slow automated enumeration. Neither fixes the flaw, but both buy time to find and fix it.

    Finding IDOR Vulnerabilities

    Manual testing workflow

  • Create two user accounts (User A and User B)
  • Log in as User A, capture requests
  • Note object identifiers in URLs, bodies, and headers
  • Log in as User B, modify identifiers from User A's requests
  • If User B can access User A's data, you found an IDOR
  • Where to look first

  • Profile and account pages — the most common IDOR location.
  • Invoice, order, and receipt endpoints — sequential IDs, high value.
  • File downloads and previews — file names as references.
  • Password-reset and email-change flows — a user_id in the body that the server trusts.
  • API endpoints — every object endpoint, including ones the UI never shows.
  • DELETE and PUT methods — testers often check GET only; write and delete endpoints are frequently unprotected.
  • Testing with Burp Suite

    Burp Suite is the standard IDOR testing tool. Intercept a request in the Proxy, send it to Repeater, and change the identifier. For scale, send it to Intruder with a numeric payload range and watch for 200 responses on other users' objects. Compare the responses: a 200 with another user's data is a confirmed finding; a 403 or a 404 that matches the "not found" response is a pass.

    # Quick terminal check with curl and jq
    curl -s -b "session=alice-session-token" \
      http://127.0.0.1:5000/api/documents/3 | jq .
    

    Testing with ffuf

    When identifiers are numeric and sequential, ffuf can enumerate them fast:

    ffuf -w ids.txt -u 'http://127.0.0.1:5000/api/documents/FUZZ' \
      -b "session=alice-session-token" -mc 200
    

    Any ID returning 200 while logged in as alice that belongs to bob is IDOR. Use ffuf only against your own lab or a target you have explicit permission to test.

    What a 403 vs 404 tells you

  • 403 Forbidden on another user's object — the check exists. Good.
  • 404 Not Found on another user's object — the check may exist, or the object may not exist. If the application returns 404 for both missing and not-owned objects, that is the recommended design — it leaks no information.
  • 200 OK with another user's data — IDOR confirmed.
  • 200 OK with your own data after changing the ID — the ID may be mapped server-side (indirect reference), or the object may genuinely be shared. Verify ownership before reporting.
  • IDOR Cheat Sheet

    Attack vectors — where identifiers hide

    LocationExampleTest
    URL path/api/users/123Change the number
    Query string/download?file=report-1234.pdfChange the file name
    POST body{"user_id": 123}Change the user_id
    JSON field{"invoice_id": 1002}Change the invoice_id
    HeaderX-Account-Id: 123Change the header
    Cookieaccount=123Change the cookie
    JWT claim"sub": "123"Check whether the token is forgeable or over-broad

    Prevention quick reference

    ControlStrengthNotes
    Server-side ownership check, every requestRequiredThe only control that actually prevents IDOR
    Scoped queries (user's records only)RequiredUnauthorized records are never loaded
    Deny by defaultRequiredNo rule means no access
    Centralized authorization policyStrongly recommendedOne middleware, applied everywhere
    Identity from the sessionStrongly recommendedIgnore client-supplied user_id for own actions
    Indirect reference mapsDefense in depthClients never see raw keys
    UUIDs / random IDsDefense in depthSlows enumeration; never a substitute for checks
    Authorization tests in CIStrongly recommendedTwo-account tests fail the build on regression
    Logging, alerting, rate limitsDetectiveSpots enumeration; does not fix the flaw

    Troubleshooting IDOR Problems

    ProblemWhat it usually meansFix
    403 on your own objectThe check is too strict, or the session identity is wrongVerify the session carries the right user; check the ownership comparison
    404 vs 403 confusionThe app returns 404 for not-owned objects by designThat is correct — do not "fix" it into a 403 that leaks existence
    UUID still exploitableThe UUID leaked via an API response, log, or shared linkUUIDs are not authorization — add the ownership check
    Check works for GET but not DELETEAuthorization was added to one method onlyApply the check to every method on the endpoint
    Test passes for one role onlyThe check covers one role's path, not all of themTest every role against every object endpoint
    Rate limits block the testThe test looks like enumeration to the WAFUse a small ID range in the lab; test in a staging environment
    Burp is not interceptingProxy not configured, or the app uses certificate pinningCheck the proxy listener and browser settings; use the lab app
    Framework middleware orderThe authorization middleware runs after the handlerRegister authorization middleware before the route handler

    Real-World Examples

    The old version of this article named three dated incidents. Their years could not be verified, so they are removed here — a security guide must not present uncertain history as fact. What is certain, and well documented, is the pattern:

  • OWASP API Security Top 10:2023 ranks Broken Object Level Authorization (BOLA) as API1 — the most common API vulnerability, ahead of broken authentication and excessive data exposure.
  • The ACSC/CISA/NSA advisory AA23-208A (July 27, 2023) warned that IDOR flaws are among the most routinely exploited access-control weaknesses, and urged vendors to build authorization into the design rather than bolting it on.
  • Bug-bounty writeups report IDOR more than almost any other web vulnerability class: one user reading or changing another user's invoices, photos, medical records, or account settings by changing an ID in a request. The mechanism is always the same — a missing ownership check — and the fix is always the same.
  • IDOR is not a rare, exotic flaw. It is the most ordinary web vulnerability there is, which is why it keeps appearing in applications of every size.

    Common Mistakes

  • Assuming UUIDs are secure: Unpredictable IDs are not authorization — endpoints still need permission checks.
  • Client-side checks only: Frontend authorization is easily bypassed. All checks must be server-side.
  • Inconsistent authorization patterns: Some endpoints check authorization while others do not — and the unchecked one is the one attackers find.
  • Checking GET but not POST, PUT, or DELETE: Read protection without write protection still lets an attacker change or delete another user's data.
  • Trusting user_id from the request body: If the client supplies the identity, the client can lie about it. Take identity from the session.
  • Returning different errors for missing vs not-owned objects: A 404 for missing and a 403 for not-owned tells an attacker the object exists. Return the same response for both.
  • Testing with one account only: A single-account test can never find IDOR. Always test with two accounts and try to cross the boundary.
  • Best Practices

  • Check authorization on every request — Treat every endpoint as potentially unauthorized
  • Use indirect references — Map user-facing IDs to internal IDs server-side
  • Implement least privilege — Users should only access resources they need
  • Use consistent authorization middleware — Apply same checks everywhere
  • Test with multiple user accounts — Verify User A cannot access User B's data
  • Make the two-account test part of CI — A missing check should fail the build, not reach production
  • Is IDOR Testing Legal?

    Testing for IDOR is legal only on systems you own or have explicit permission to test — your own lab, a staging environment you control, or a bug-bounty program whose scope explicitly covers the target. Changing IDs in requests to a live site you do not own is unauthorized access, even if you only read one record and report it. Keep all testing inside the local lab described above until you have written permission.

    Summary

    IDOR vulnerabilities arise from missing authorization checks on object references. The fix is straightforward: verify the requesting user has permission to access the specific resource on every request. Use indirect references and centralized access control patterns to reduce risk. Remember the three ingredients — an object, a reference, and a missing check — and remove the third one everywhere. Authentication proves who you are; authorization proves you may touch this object. Test with two accounts, automate that test in CI, and treat every object endpoint as a potential IDOR until proven otherwise.

    Knowledge Check

  • What are the three ingredients of an IDOR vulnerability?
  • Why does authentication alone not prevent IDOR?
  • What is the difference between horizontal and vertical IDOR?
  • Why are UUIDs not a sufficient defense against IDOR?
  • What response should a fixed endpoint return when user A requests user B's object, and why?
  • How does an indirect reference map differ from direct object references?
  • Why must authorization checks be server-side rather than client-side?
  • What is the difference between IDOR and BOLA?
  • Answers: 1. An object, a reference to it, and a missing object-level authorization check; 2. Authentication proves who you are, but only authorization checks whether you may access that specific object; 3. Horizontal IDOR accesses another user's data at the same privilege level, while vertical IDOR accesses higher-privilege functions or data; 4. UUIDs are obfuscation, not authorization — a leaked or enumerated UUID still grants access without a permission check; 5. A 404 (or a 403) identical to the response for a missing object, so the attacker cannot tell whether the object exists; 6. An indirect reference map replaces the raw internal ID with a per-user or per-session handle that the server translates back; 7. Client-side checks run in code the attacker controls and can bypass, so the check must run on trusted server-side code; 8. They are the same flaw — IDOR is the web-application term, BOLA is the API term (OWASP API1:2023).

    Keep Learning

  • API Hacking Guide
  • SSRF Explained
  • CSRF Explained
  • Burp Suite Introduction
  • OWASP Top 10 Explained
  • Burp Suite
  • OWASP ZAP
  • FFUF
  • Nikto
  • Frequently Asked Questions

    What is IDOR and how does it work?

    IDOR (Insecure Direct Object Reference) occurs when an application exposes a reference to an internal object (like a user ID or filename) and fails to verify the requesting user has permission to access it. The attacker simply changes the identifier — for example, changing /invoices/1001 to /invoices/1002 — to access another user's data.

    What is the difference between horizontal and vertical IDOR?

    Horizontal IDOR accesses resources at the same privilege level belonging to another user — viewing another customer's order. Vertical IDOR accesses resources requiring higher privileges — a regular user accessing admin functions. Both stem from missing authorization checks, but vertical IDOR can lead to full privilege escalation.

    Why are UUIDs not a sufficient defense against IDOR?

    UUIDs are obfuscation, not authorization. While unpredictable IDs make guessing harder, they do not prevent access if the endpoint still lacks permission checks. If a user can enumerate or obtain valid UUIDs (via API responses, logs, or leaks), they can access unauthorized resources. Always pair unpredictable IDs with server-side authorization.

    What is the recommended testing approach for IDOR?

    Create two user accounts (User A and User B). Log in as User A, capture requests with Burp Suite, note object identifiers in URLs and bodies. Log in as User B and replay User A's requests with modified identifiers. If User B accesses User A's data, you found an IDOR. Test every endpoint that references user-specific objects.

    How does an indirect reference map differ from direct object references?

    Direct object references expose internal IDs (database primary keys) in URLs. Indirect references map user-facing tokens to internal IDs server-side — the client never sees the real database ID. This prevents IDOR because the attacker cannot guess or manipulate the internal identifier, even if they can access the indirect reference.

    Why must authorization checks be server-side rather than client-side?

    Client-side checks (JavaScript validation, hidden HTML elements) are easily bypassed. An attacker can intercept and modify requests with Burp Suite, disable JavaScript, or send raw HTTP requests. All authorization must be enforced on the server where the attacker cannot manipulate the code executing the checks.

    What are real-world examples of IDOR vulnerabilities?

    IDOR is consistently one of the most reported web vulnerabilities in bug-bounty programs, and it is the top item in the OWASP API Security Top 10:2023 (BOLA, API1:2023). A joint advisory from ACSC, CISA and NSA (AA23-208A, July 2023) warned that IDOR flaws are among the most routinely exploited access-control weaknesses. Typical public reports involve one user reading or changing another user's invoices, photos, or account settings by changing an ID in a request. All are fixed by adding server-side authorization checks.

    How do I test for IDOR in an API?

    Capture API requests with Burp Suite or curl, identify object references in URLs, query parameters, and request bodies. Authenticate as different users and replay requests with modified identifiers. Check for consistent authorization across all endpoints — developers often secure some routes but forget others. Use ffuf to fuzz for valid object IDs.

    What is the relationship between IDOR and the OWASP Top 10?

    IDOR falls under OWASP A01:2021 — Broken Access Control, the number one web application security risk. Broken access control includes privilege escalation, insecure direct object references, and missing restrictions on API endpoints. Implementing role-based access control (RBAC) with server-side enforcement addresses IDOR.

    How do I prevent IDOR in a REST API?

    Implement authorization middleware that checks permissions on every request. Use indirect references — map user-facing IDs to internal IDs server-side. Apply the principle of least privilege — users should only access resources they need. Use consistent authorization patterns across all endpoints rather than checking some and not others.

    Can IDOR vulnerabilities lead to data breaches?

    Yes — IDOR is one of the most common causes of large-scale data breaches. If an application exposes sequential user IDs without authorization checks, an attacker can iterate through all IDs and exfiltrate every user's data. Automating IDOR exploitation with tools like Burp Intruder or ffuf can expose millions of records.

    How does IDOR differ from SSRF?

    IDOR exploits missing authorization on object references the client can see and manipulate. SSRF tricks the server into making requests to unintended locations the client cannot directly access. IDOR is about accessing other users' data through manipulated identifiers; SSRF is about using the server as a proxy to reach internal resources.

    How do I prevent IDOR attacks?

    Verify authorization on the server for every object on every request — check that the logged-in user owns or may access the specific object before returning it. Scope database queries to the current user's records, deny by default, enforce the rules through one centralized middleware or policy, take identity from the session rather than from client-supplied fields, and use indirect references and UUIDs only as defense in depth. Add a two-account regression test for every object endpoint so a missing check fails the build.

    What is IDOR in simple words?

    IDOR means a website lets you see or change someone else's stuff just by changing a number in a web address or a form. You are logged in as yourself, but the site never checks whether the thing you asked for actually belongs to you. If changing /user/123 to /user/124 shows another person's profile, that is IDOR.

    What is the difference between IDOR and BOLA?

    They are the same vulnerability in different places. IDOR is the web-application term from the OWASP Top 10, where the flaw appears in browser flows. BOLA (Broken Object Level Authorization) is the API term from the OWASP API Security Top 10:2023, where it ranks API1. Both mean a missing object-level authorization check, and both are fixed the same way.

    What tools can I use to test for IDOR?

    Burp Suite is the standard tool — intercept a request in the Proxy, change the identifier in Repeater, and use Intruder to enumerate sequential IDs. OWASP ZAP does the same job for free. ffuf enumerates numeric IDs quickly from the terminal, and curl with jq is enough for a quick manual check. All testing must be on your own lab or a target you have explicit permission to test.

    Is IDOR still a problem in 2027?

    Yes. Broken Access Control remains number one in the OWASP Top 10:2025, and BOLA remains number one in the OWASP API Security Top 10:2023. IDOR is still one of the most reported vulnerabilities in bug-bounty programs because every new endpoint is a chance to forget one authorization check.

    Continue Learning

    Web Security · Intermediate

    What Is SSRF? Server-Side Request Forgery Examples & How to Prevent SSRF Attacks

    What is SSRF? See real server-side request forgery examples, a worked lab test, and how to prevent SSRF attacks with allowlists, IMDSv2 and egress controls.

    Web Security · Intermediate

    What Is SQL Injection? Types, Examples & How to Prevent SQL Injection Attacks

    What is SQL injection? See real SQL injection examples, a worked DVWA lab test, and how to prevent SQL injection with parameterized queries.

    Web Security · Intermediate

    What Is CSRF? Cross-Site Request Forgery Examples & How to Prevent CSRF Attacks

    What is CSRF? Learn how cross-site request forgery tricks your browser into unwanted actions, see real examples and a DVWA worked test, and follow 7 steps to prevent CSRF attacks with tokens, SameSite cookies and framework protection.

    Web Security · Intermediate

    JWT Security: What Is a JWT, Common Attacks & How to Test Them

    What is a JWT? Learn JWT security: how JSON Web Tokens work, the none and algorithm confusion attacks, and how to test JWTs with jwt_tool and Burp Suite.

    Related Security Tools

    Web Application

    Burp Suite

    Burp Suite is the industry-standard web application security testing platform from PortSwigger, free as Community Edition on Kali Linux. Learn how to use Burp Suite: install it, route your browser through its proxy, intercept your first request, and test it with Repeater and Intruder.

    Web Application

    SQLMap

    SQLMap is an open-source penetration testing tool that automates SQL injection detection and exploitation. It supports six SQL injection techniques (boolean-based blind, time-based blind, error-based, UNION query-based, stacked queries, and out-of-band) and over 30 database backends including MySQL, Oracle, PostgreSQL, Microsoft SQL Server, and many more.

    Vulnerability Analysis

    Nikto

    Learn how to use Nikto, an open-source web server scanner written in Perl and pre-installed on Kali Linux, to audit servers you own or have written permission to test. Its 6700+ checks for potentially dangerous files and programs, plus tests for outdated software and misconfigurations, highlight issues that need verification.

    Web Security

    Security Headers Checker

    Check HTTP security headers (CSP, HSTS, X-Frame-Options, X-XSS-Protection, Referrer-Policy, and more) with security scoring.

    Written by GO KALI FREE Team