Web App Security

What Is IDOR (Insecure Direct Object Reference)? Definition, Architecture & Defense

Quick Definition: Insecure Direct Object Reference (IDOR), a form of Broken Object Level Authorization (BOLA), occurs when an application uses a client-supplied identifier (such as ?invoice_id=1042) to fetch or modify a record without verifying that the logged-in user owns that object.

How IDOR (Insecure Direct Object Reference) Works in Practice

A user logs in legitimately and sees a request to GET /api/v1/orders/5001. If the backend database query simply runs SELECT * FROM orders WHERE id = 5001 without checking AND user_id = current_session.user_id, an attacker can increment or decrement the ID to 5002 and read or modify another customer private data.

Defensive Mitigation & Hardening Checklist

Enforce server-side object ownership checks on every read, update, and delete controller action, and use unpredictable UUIDv4 or scoped indirect references alongside strict authorization middleware.

Hands-On Tool & Cheat Sheet


Related Security Glossary Terms