Insecure Direct Object References (IDOR)

What are Insecure Direct Object References (IDOR)?

Insecure Direct Object References (IDOR) represent a security vulnerability where an attacker can access or manipulate objects (files, database records, resources) directly by modifying input parameters such as URLs or form fields. This occurs when an application does not properly validate or authorize user requests, allowing unauthorized access to sensitive data.


Example of an IDOR Attack

Consider a web application that allows users to view their own profile information by navigating to a URL like this:

https://example.com/profile?user=johndoe

An attacker could manipulate the URL to access someone else's profile:

https://example.com/profile?user=malicioususer

Without proper access controls, the attacker gains unauthorized access to another user's sensitive data.


Prevention Measures

To prevent Insecure Direct Object References (IDOR), follow these security best practices: