IDOR Final
IDOR Final
Technical Index:
1. Introduction to IDOR
2. Identifying IDOR Vulnerabilities
3. Effective Note-Taking for IDOR Findings
4. Code Analysis for IDOR Detection
o IDOR in C#/.NET
o IDOR in PHP
o IDOR in JavaScript/Node.js
o IDOR in Python/Flask
5. IDOR Testing Methodologies
6. Automated Testing for IDOR
7. The Art of IDOR Exploitation: Techniques Beyond the Basics
8. Unique and Advanced IDOR Exploitation Techniques
9. Mitigating IDOR Vulnerabilities
10. Case Studies: IDOR Reports from Security Platforms
o Medium Writeups
o HackerOne Reports
11. Practical Demonstrations: IDOR Exploitation Labs
12. Expert Insights: Best Practices from Top Security Researchers
13. Conclusion
Introduction to IDOR
Insecure Direct Object References (IDOR) is a critical web application security vulnerability that
occurs when an application improperly exposes internal object identifiers, such as database keys,
file paths, or user IDs, without implementing proper access controls. This flaw enables attackers
to manipulate these identifiers and gain unauthorized access to sensitive data or perform
unauthorized actions.
IDOR vulnerabilities typically arise due to insufficient validation and authorization checks on
user-supplied input. When an application relies solely on client-side values (such as URL
parameters, form fields, or API requests) without verifying whether the requesting user has the
necessary permissions, it creates an opportunity for malicious exploitation. Attackers can
systematically modify request parameters to access or manipulate data belonging to other users,
potentially leading to severe consequences such as data breaches, account takeovers, or privilege
escalation.
A real-world example of the impact of IDOR was observed in Starbucks' system, where a
vulnerability could have led to the exposure of data from over 6 million customers. The issue
was mitigated before any harm occurred, emphasizing the importance of proactive security
measures. (Read more here)
Visual Representation of IDOR Risk
https://dreamlab.net/en/blog/post/starbucks-idor-how-we-prevented-an-information-leak-of-6-million-
starbucks-customers/
Left Side (No IDOR Vulnerability): A secure web server with good access control
ensures that users can only access their own records. Unauthorized access attempts are
blocked.
Right Side (IDOR Vulnerability): An insecure web server with bad access control
allows a malicious user to access or modify records belonging to at-risk users, leading
to data exposure or manipulation.
Finding an IDOR vulnerability is like sneaking a peek at someone else's diary just by changing a
page number. If a web application isn’t strict about enforcing access controls, attackers can
manipulate a URL or API request to access unauthorized data.
What happens if you change 123 to 124? If you suddenly see someone else’s profile—boom,
that’s IDOR! This simple parameter manipulation is one of the most common ways IDOR
vulnerabilities are discovered.
A great hacker, Katie Paxton-Fear (widely known as the "API Queen"), provides solid advice
on how to start hunting for IDOR vulnerabilities. She explains techniques that security
researchers and bug bounty hunters can use to efficiently identify these flaws.
Additionally, you can explore her entire collection of security-focused tutorials on her YouTube
channel:
📺 InsiderPhD YouTube Channel
Katie Paxton-Fear Methodology-2
When analyzing web applications for vulnerabilities, focus on the following areas:
Katie Paxton-Fear Methodology-3
Look for sequential, predictable, or exposed identifiers in URLs, request parameters, and
responses.
These could indicate potential Insecure Direct Object References (IDORs) when manipulated.
API endpoints often expose sensitive data or allow unauthorized access if proper validation isn’t
implemented.
Test API requests by modifying IDs to access other users' data.
3. Complex Permission Hierarchies
Enterprise applications and multi-user platforms use role-based access control (RBAC).
Misconfigurations can lead to privilege escalation or unauthorized access to restricted areas.
By carefully examining these areas, security researchers can effectively detect IDOR
vulnerabilities before malicious actors exploit them.
To efficiently test for IDOR, rs0n_live emphasizes the importance of setting up two different
accounts:
Having two accounts allows you to easily compare requests and analyze access control
weaknesses.
Step 2: Use Visual Studio for Note-Taking
To maintain structured notes, rs0n_live recommends using Visual Studio Code (VS Code). This
tool helps in:
VS Code offers extensions like Markdown Notebooks and REST Client to make note-taking
more efficient.
rs0n Methodology Part:2
1. Identify where user-controlled parameters are being used (e.g., in URL paths, request bodies, or
headers).
2. Check if modifying these values grants unauthorized access.
3. Record every step, including request types (GET/POST), endpoints, and server responses.
rs0n Methodology Part:3
Step 4: Use Xmind for Visualization
For a more structured and visual approach, Xmind is a great tool for creating flowcharts and
mind maps. rs0n_live uses Xmind to:
🔗 Download Xmind
By following this structured note-taking process, bug hunters can refine their own
methodologies. The combination of practical testing, proper documentation, and visual
mapping helps in writing clear and impactful reports.
By adopting this approach, security researchers and bug bounty hunters can effectively analyze
and report IDOR vulnerabilities with precision and clarity.
Here’s your "Code Analysis for IDOR Detection" section structured in a step-by-step manner
with explanations and relevant links.
Code Analysis for IDOR Detection
Understanding how IDOR vulnerabilities manifest in code is essential for both developers and
security researchers. This section provides a step-by-step analysis of vulnerable and secure
implementations across multiple programming languages, including C#/.NET, PHP,
JavaScript/Node.js, and Python/Flask.
🔴 Vulnerable Code
⚠️ Issue:
The application directly retrieves orderId from the request and fetches order details without
verifying ownership.
Any authenticated user can change the orderId in the query string and view another user's
order.
✅ Secure Code
🔒 Fix:
Ensures that the UserId associated with the order matches the currently logged-in user.
Returns 403 Forbidden if an unauthorized user attempts access.
🔗 Further Reading:
.NET Security Best Practices
🔴 Vulnerable Code
⚠️ Issue:
Directly uses $_GET['user_id'], allowing attackers to modify the user_id in the URL.
SQL Injection Risk: This code is vulnerable to injection attacks since user input is not sanitized.
✅ Secure Code
🔒 Fix:
Uses session-based authentication instead of accepting user_id from the query string.
Uses prepared statements to prevent SQL Injection.
🔗 Further Reading:
PHP Secure Coding Practices
🔴 Vulnerable Code
⚠️ Issue:
✅ Secure Code
🔒 Fix:
🔗 Further Reading:
Node.js Security Guide
🔴 Vulnerable Code
⚠️ Issue:
✅ Secure Code
🔒 Fix:
🔗 Further Reading:
Flask Security Best Practices
Each secure implementation ensures that users can only access their own data, preventing
unauthorized access, data leakage, and potential IDOR exploits.
The following are various test cases to detect Insecure Direct Object References (IDOR)
vulnerabilities in web applications. These scenarios outline common methods attackers may use
to exploit IDOR and their impact on security.
Checking Below Mindmap we can get a Precise Idea about probable IDOR test cases.
https://twitter.com/muffymas/status/1408054941445353472?s=20
Here is a refined and organized list of all 33 IDOR (Insecure Direct Object Reference) test cases
with detailed, step-by-step descriptions:
Test Case 4: Offering the Application an ID, Even If It Doesn't Ask for One
Test Case 7: Changing Request Methods (GET, POST, PUT, DELETE, PATCH)
1. Request: POST
/api_v1/shopping_list?user_id=456&item=<script>alert(1)</script>
2. Exploitation: If the input is stored and executed, you now have XSS via IDOR.
3. Impact: Account takeover through XSS injection.
Test Case 11: Add IDs to Requests That Don’t Have Them
Test Case 13: Supply Multiple Values for the Same Parameter
Test Case 26: Test the Same Web Endpoint in Mobile Applications
1. Action: Create multiple accounts and analyze how hashed IDs are assigned.
2. Exploitation: Manipulate the hash or encoding to access data.
3. Impact: Exposure to unauthorized data based on weak encoding or hashing.
1. Action: Review URLs, POST bodies, headers, and cookies for user-referenced object parameters.
2. Exploitation: Manipulate parameters to access other users' data.
3. Impact: Unauthorized access to user data through parameter manipulation.
1. Action: Test API with accounts having different privilege levels (admin, user, guest).
2. Exploitation: Test if object references can escalate privileges.
3. Impact: Privilege escalation via object manipulation.
Manually testing for Insecure Direct Object References (IDOR) can be time-consuming,
especially when dealing with large applications with multiple roles and permissions. To enhance
efficiency, penetration testers rely on automation tools like PwnFox, Autorize, and
AutoRepeater to identify IDOR vulnerabilities faster and with greater accuracy.
What is PwnFox?
PwnFox is a powerful Firefox extension and Burp Suite plugin developed by @Bitk. It
simplifies web security testing by enabling multiple unique session handling in a single browser
window using Firefox containers.
Key Features:
✅ Firefox Extension – Proxy your browser with Burp Suite and handle up to 8 isolated
container sessions.
✅ Burp Plugin – Highlights requests in different colors based on the container session.
How It Works:
🔹 Open multiple PwnFox tabs in Firefox – each tab is assigned a unique color for clear session
differentiation.
🔹 Requests from each container are highlighted and grouped in Burp Suite’s HTTP history,
making it easier to analyze session-based vulnerabilities.
1. Open multiple browser tabs with different user roles (e.g., Admin, Member, Guest).
2. Identify key API endpoints and methods (GET, POST, PUT, DELETE).
3. Modify user IDs, object references, or session tokens in Burp Repeater to check for
unauthorized access.
🔗 Read the full write-up: YesWeHack Blog - PwnFox & Autorize for IDOR
Step 2: Automating IDOR Testing with Autorize
What is Autorize?
Autorize is a Burp Suite extension developed by Barak Tawily that automates the detection of
authorization bypass vulnerabilities, including IDOR.
Installation Steps:
2. Log in as both an attacker and victim (e.g., Admin and Normal User).
3. Copy the attacker's session cookie/token into Autorize.
4. Enable Autorize and interact with the application as the victim.
Detecting IDOR Vulnerabilities:
🛠️ How It Works:
💡 Tip: Test every Admin function! If a normal user gets 200 OK, it’s an IDOR vulnerability.
AutoRepeater is a more advanced version of Autorize for precise testing, useful for dynamic
parameters like UUID, SUID, UID.
💡 Key Features:
🚀 Combine Autorize & AutoRepeater to test not just within a tenant but also across multiple
tenants!
🔗 Watch the tutorial by Stök & Fisher: YouTube - AutoRepeater for IDOR
Step 4: Combining Tools for Maximum Efficiency
🚀 Use PwnFox, Autorize, and AutoRepeater together to streamline IDOR testing and
uncover access control vulnerabilities faster!
💡 Tip: Always manually validate automated findings to confirm the vulnerability and report it
with clear proof-of-concept (PoC) evidence!
🔗 Read the full blog: YesWeHack - PwnFox & Autorize for IDOR
Final Thoughts
IDOR vulnerabilities often involve operations such as create, update, or delete, where an object
is readable but should not be writable. A great way to identify such vulnerabilities is by testing
these operations on objects that should be protected.
Pro Tip:
Try modifying objects that are publicly accessible but should not be publicly modifiable. For
example, can you send a PUT request to /api/products to alter the price of a product?
Example on Twitter
2. Discovering Unpredictable IDs Using Archiving and Scanning Tools
Unpredictable IDs may appear to be secure at first, but there are many ways attackers can still
uncover them. Here are several tools and services you can use to find IDs stored in URLs:
Wayback Machine: Search archived pages for old URLs containing unpredictable IDs.
Wayback Machine Search
AlienVault OTX: This platform can provide archived URLs that contain IDs in
parameters.
AlienVault OTX API
URLScan: Scans websites for malicious content and may log unpredictable IDs.
URLScan Search
Common Crawl: Archives web pages and may capture unpredictable IDs.
Common Crawl
VirusTotal: Analyzes URLs and can sometimes expose IDs.
VirusTotal API
Automated Tools: Tools like waymore, waybackurls, and gau can be used to gather
URLs containing IDs.
GitHub - waymore
Google Search & GitHub Search: Google indexes URLs containing IDs. Similarly,
searching public repositories on GitHub might expose hardcoded IDs.
Other Techniques:
o Referrer Headers
o Browser History
o Web Logs
o Insider Threats
o Clickjacking
o Accidental Screen Sharing
o Hard-Coded IDs
o Cryptographic Flaws
When testing for IDOR in applications with models that reference other models, sometimes
storing non-existent IDs can lead to vulnerabilities.
Link: https://x.com/jobertabma/status/1222194853066358784
Let's say there is a bug tracker application where users can submit bug reports. Each bug report
is assigned an id, and it references a project_id that the bug belongs to.
When a user creates a bug report, the request might look like this:
{
"title": "Crash on login",
"description": "App crashes when I log in.",
"project_id": 12345 // User's authorized project
}
Attack Strategy
As an attacker, intercept the request in Burp Suite and modify the project_id to a non-existent
value:
{
"title": "Testing bug",
"description": "Checking something...",
"project_id": 99999 // Non-existent project
}
If the server does NOT validate the project_id on creation, it might accept and store it,
assuming the project will be created later.
The response might look like:
{
"success": true,
"bug_id": 56789
}
Even though project_id: 99999 doesn’t exist, the bug report gets created and saved.
If the application checks authorization only when writing but not when reading, you could now
view details of a project you don't own.
Imagine you are testing a banking application that allows users to access their transaction
history using the following endpoint:
GET <https://banking.example.com/api/transactions/123>
Potential Vulnerability
The backend microservices architecture may process the request by forwarding it internally to
another microservice using HTTP, such as:
GET /transactions/:id
However, if the application does not properly validate the id parameter and simply extracts the
first integer from the path, it might be vulnerable.
This might trick the backend into resolving the path as:
GET /api/transactions/456
If authentication checks only validate the initial ID (123) and ignore the /../456 part, you
could access transaction 456, which belongs to another user.
1. Forward the request and check the response in Burp Suite's HTTP history.
2. If the response contains another user's transaction details, then the system is vulnerable to
IDOR via path traversal.
Why Does This Happen?
<?php
$id = (int)$_GET['id']; // Converts "123/../456" to just "123"
echo "Fetching transaction for ID: $id";
?>
Since PHP casts strings to integers and ignores non-numeric characters after the first valid
number, it may validate access based on "123" but then process the path as "456".
When traditional IDOR testing methods fail, it's important to get creative. Here are a few
strategies to consider:
Test across APIs: If a web application has corresponding mobile APIs, check them for UUIDs that
may be used for IDOR.
Guessing Numeric IDs: Use tools like Burp Suite Intruder to brute-force numeric ID ranges (e.g.,
100-1000).
Try wildcard substitutions: Sometimes using a wildcard (*) in place of an ID works to reveal
unauthorized data.
Endpoint Testing: If endpoints are named /api/users/myinfo, try /api/admins/myinfo to
check for different access controls.
Manipulate HTTP Methods: Changing the request method from GET to POST or PUT can
sometimes expose hidden data.
6. Trick that allowed me to find many IDORs.
7. Credit Section
These techniques highlight advanced IDOR exploitation methods and provide a foundation for
discovering and testing vulnerabilities in applications. Always remember to use responsible
disclosure practices and report your findings to the appropriate stakeholders.
Unique and Advanced IDOR Exploitation Techniques
IDOR vulnerabilities often extend beyond simple ID replacements. Attackers leverage creative
and advanced methodologies to bypass access controls, exploit insecure implementations, and
chain vulnerabilities for greater impact. Below are some unique techniques used to uncover and
exploit IDOR.
1. No ID, No Worry
Discovery
While testing a web application, an interesting pattern was observed in API requests:
/something/something/self/something
To test for IDOR, the self parameter was replaced with an actual user ID extracted from the
JWT token:
/ngprofile/aggregate/31337/fullProfile
This returned the complete profile details of the authenticated user. When the ID was changed to
another incremented value, the server revealed details of a different user—confirming the IDOR
vulnerability.
Impact
This issue extended to various APIs, including the Change Email API, allowing:
Key Takeaways
📌 Read more: Starbucks IDOR: How we prevented an information leak of 6 million customers
2. Don’t Just Replace IDs
In an API request:
/accounts/0001176361
Replacing the user ID returned an "Invalid account number" response. However, appending / at
the end:
/accounts/0001176361/
Bypassed the access control restriction and returned sensitive user details.
An API endpoint:
api/applications/18385027
Initially, replacing the application ID resulted in a 401 Unauthorized response. However,
adding special characters (%20, %09, %0b, etc.) bypassed the authorization check, exposing full
application details.
Key Takeaways
Don’t limit IDOR testing to simple ID replacement—fuzz parameters with special characters.
Regex-based security mechanisms can be bypassed with unconventional inputs.
Many assume GraphQL APIs are secure, but they can contain IDOR vulnerabilities if
authorization checks aren’t enforced. By revisiting Burp Suite history, GraphQL endpoints were
found in API requests. Replacing object IDs in GraphQL queries revealed unauthorized data.
Key Takeaways
GraphQL security is often misconfigured, even by large companies like Facebook and Google.
Always test GraphQL endpoints for IDOR vulnerabilities.
📌 More info: Hunting For Bugs That Scanners Miss by Ayoub Safa
Step 1: Two accounts were used (attacker and victim), and both had unique
resource IDs.
Step 2: Entering the victim’s resource ID from the attacker account returned 403
Forbidden.
Step 3: Another API endpoint was discovered that accepted the victim’s ID
without proper validation, allowing an update.
Step 4: Returning to the first page (Step 2), the previous restriction was now
bypassed, resulting in 200 OK access.
📌 Real-world example: How I was able to get an account takeover via IDOR from JWT
1. What is UUID/GUID?
UUIDs are generally represented in hexadecimal format and split into five groups separated by
hyphens:
123e4567-e89b-12d3-a456-426614174000
2. Different Types of UUIDs
UUIDs are categorized into different versions based on how they are generated.
Generated using the current timestamp and MAC address of the machine.
The first part encodes the time when the UUID was generated.
The last section contains a MAC address or random node ID.
The clock part is usually random but can sometimes be predictable.
➤ Tools for Decoding and Analyzing UUIDs
A web application allows users to reset their passwords by sending a reset link containing a
UUIDv1.
Example:
Step 2: Extracting Timestamp and MAC Address from UUIDv1
This unique attack method, discovered by security researcher Lupin, demonstrates how
sequentially generated UUIDv1 values can be predicted and brute-forced to enumerate API keys,
reset tokens, or other security-sensitive identifiers. Below is a step-by-step breakdown of the
Sandwich Attack, along with a real-world exploitation scenario.
Before exploiting the vulnerability, it's essential to understand how UUIDv1 (Universally
Unique Identifier version 1) works. UUIDv1 is composed of the following parts:
Timestamp (High, Mid, Low) → Records the time when the UUID was generated.
Clock Sequence → Helps prevent duplicate UUIDs when the system clock is adjusted.
Node ID (MAC Address) → Stores the MAC address of the machine that generated the UUID.
UUID Version → Specifies the UUID format (UUIDv1 uses version 1).
1. The timestamp is sequential, meaning consecutive UUIDs have timestamps close to each other.
2. The MAC address (Node ID) remains constant if UUIDs are generated on the same machine.
3. The Clock Sequence does not change frequently.
This predictability allows an attacker to reverse engineer UUIDv1 values and predict future or
past UUIDs within a short range.
1️⃣ Extract the Timestamp (High, Mid, Low) from the UUID.
This calculation provides a UNIX timestamp in seconds, revealing the precise moment when the
UUID was generated.
3️⃣ Knowing when a UUID was created helps attackers predict future UUIDs or brute-force
recent ones.
Many applications generate multiple API keys or password reset tokens in quick succession
using UUIDv1. This means:
✔ If an attacker obtains one API key, they can estimate the timestamp and machine ID.
✔ Using this knowledge, they can predict and enumerate other users' API keys.
836d28b2-7592-11e9-8201-bb2f15014a14
3️⃣ By extracting the timestamp, they determine that the API key was generated at 2019-05-13
14:32:10.
4️⃣ Since other users registered at the same time, their API keys have similar timestamps.
5️⃣ The attacker uses brute-force enumeration to predict and test valid API keys.
🔴 Result: The attacker gains access to multiple API keys, leading to a severe security breach.
The Sandwich Attack can be used to hijack password reset links that rely on UUIDv1.
Consider a web application with a "Forgot Password" feature that generates a UUIDv1-based
reset token and sends it via email.
https://www.acme.com/reset/836d28b2-7592-11e9-8201-bb2f15014a14
1️⃣ The attacker requests a password reset for their own email ([email protected]).
2️⃣ Immediately after, they request a password reset for the targeted victim ([email protected]).
3️⃣ Finally, they request a second reset for another attacker-controlled email
([email protected]).
The attacker now has two UUIDs from their own password reset requests:
https://www.acme.com/reset/**99874128**-7592-11e9-8201-bb2f15014a14
https://www.acme.com/reset/**998796b4**-7592-11e9-8201-bb2f15014a14
Since UUIDv1 increments sequentially, the victim's password reset UUID must be within this
range.
The attacker systematically brute-forces the hexadecimal range between the two known UUIDs:
99874128 → 998796b4
This space consists of ~22,000 possible UUIDs, which can be brute-forced in under an hour
using tools like:
📌 Sandwich Brute-Force Tool: GitHub - Lupin-Holmes/sandwich
📌 Turbo Intruder (Burp Suite Extension)
Once the correct UUID is found, the attacker accesses the victim's password reset page:
https://www.acme.com/reset/**99876914**-7592-11e9-8201-bb2f15014a14
They can now change the victim’s password and take over the account.
🚨 Critical Impact: The attacker gains full control over the victim's account without requiring
any credentials.
While the Sandwich Attack is a powerful method for brute-forcing UUIDv1 values, attackers
can use additional tricks to maximize their success rate. Here are some advanced techniques and
real-world insights that could lead to even bigger security breaches.
🔹 In some applications, developers make the critical mistake of assigning fixed UUIDs to high-
privilege accounts, such as administrators or system users.
For example, if you inspect an API response or database dump, you might come across UUIDs
like:
00000000-0000-0000-0000-000000000000
11111111-1111-1111-1111-111111111111
💡 Why is this a problem?
If these UUIDs correspond to admin users, an attacker could attempt IDOR (Insecure Direct
Object References) to access admin functionalities.
By modifying their own user ID in requests, they might escalate privileges without
authentication.
🚀 Exploitation Tip:
1️⃣ Look for UUIDs with repeated digits or a pattern like 0000-0000-0000-0000.
2️⃣ Try directly requesting sensitive endpoints using these fixed UUIDs.
3️⃣ If found in API responses, attempt IDOR attacks by replacing your own user ID with the
fixed one.
🔹 Many applications leak UUIDs in public endpoints, forgotten logs, or archived web pages. If
you can recover old UUIDs, you may be able to brute-force the ones that followed.
If an app uses UUIDv1, the sequence is predictable because the timestamps increase over time.
By finding an old UUID, you can calculate the approximate timestamp and guess future values.
🚀 Exploitation Tip:
1️⃣ Use Wayback Machine to search for historical API responses, old password reset links, or
leaked UUIDs.
2️⃣ If you find an old UUID, extract the timestamp and determine the approximate generation
frequency.
3️⃣ Predict the UUID range and use brute force to find the next valid ones.
Example Scenario:
UUID-based vulnerabilities are often overlooked, but with the right techniques, you can uncover
critical security flaws. Whether it's enumerating admin accounts, predicting password reset
links, or exploiting sequential UUID leaks, mastering these attacks could lead to big bounty
payouts or high-severity CVEs.
📌 Final Thoughts
The Sandwich Attack highlights why UUIDv1 should never be used for authentication or
security tokens. Since UUIDv1 is predictable, attackers can enumerate API keys, hijack
password resets, and escalate privileges.
🚀 Pro Tip: If you find UUIDs in an application, check whether they are sequential. You might
uncover a critical vulnerability worth thousands of dollars in bug bounties! 💰
5. Final Takeaways
✅ UUIDv1 should never be used for security-sensitive tokens (reset links, API keys).
✅ Always check if UUIDs follow predictable patterns in web applications.
✅ Test for sequential UUID vulnerabilities using tools like guidtool and sandwich.
✅ GraphQL and REST APIs using UUIDs can still be vulnerable to IDOR if access
controls are weak.
✅ Regularly audit API security to prevent predictable token generation attacks.
📌 Further Reading:
🔗 Universally Unique Identifiers Attack Methods: Versprite Blog
🔗 Practical UUID Exploitation Guide: Medium Write-Up
Enforce authorization checks on every request to verify user permissions before granting
access.
Use server-side validation to prevent unauthorized access.
Use indirect references like UUIDs or hashed IDs instead of sequential or predictable identifiers
(e.g., user_id=123 → user_id=a1b2c3).
Avoid exposing raw database keys in URLs or API responses.
Implement Role-Based Access Control (RBAC) to restrict users based on predefined roles and
permissions.
Use Attribute-Based Access Control (ABAC) to grant access based on dynamic user attributes,
such as department, location, or device type.
Grant users the minimum access rights necessary to perform their tasks.
Restrict users from modifying or viewing objects they do not own.
Prevent ID manipulation by ensuring that users can only access objects they are authorized to.
Validate user input both client-side and server-side to prevent tampering.
Maintain detailed access logs to detect and investigate unauthorized access attempts.
Use real-time monitoring to identify suspicious activities.
Implement rate limiting and request throttling to prevent automated ID guessing attacks.
Detect and block excessive failed access attempts.
Perform manual code reviews and automated security scans to identify IDOR vulnerabilities.
Run penetration tests to simulate real-world attack scenarios.
Encrypt sensitive identifiers both at rest and in transit using strong encryption protocols.
Ensure that API responses return only necessary data (avoid exposing unnecessary user details).
By implementing these measures systematically, organizations can significantly reduce the risk
of IDOR vulnerabilities and enhance the security of their applications.
In-Depth IDOR Case Studies: Real-World Exploits and Lessons from Security Researchers
From Medium"
🔗 Read Here
Steps:
1️⃣ Added an alt account to an organization with a "member" role.
2️⃣ Linked a credit card to the admin account.
3️⃣ Captured a POST request to /endpoints/billing/get-account.
4️⃣ Identified parameters: code (organization ID) and id (user ID).
5️⃣ Fuzzed /endpoints/users/org-users and found the admin’s user ID.
6️⃣ Replaced id with the admin’s user ID.
7️⃣ Successfully accessed sensitive billing info (name, address, IP, partial card details).
8️⃣ Reported the vulnerability.
2. Bank Offer IDOR ($5,000 Bounty)
🔗 Read Here
Steps:
1️⃣ Received an email with an offer containing a reservation ID.
2️⃣ Entered the code on the bank’s website and noticed an encoded value in the URL.
3️⃣ Found the decoded version in the response.
4️⃣ Replaced the encoded value with a numeric variation.
5️⃣ Successfully accessed other users’ offers and their personal details.
6️⃣ Stopped testing and reported it immediately.
🔗 Read Here
Steps:
1️⃣ Identified that reservation numbers were predictable and sequential.
2️⃣ Noticed that access codes were unique but exploitable.
3️⃣ Used their own access code with another user's reservation number.
4️⃣ Successfully accessed unauthorized offers.
5️⃣ Reported the vulnerability and received a higher bounty.
4. Encryption & IDOR in Insurance Policies
🔗 Read Here
Steps:
1️⃣ API allowed encryption of policy IDs via /api/claims/encrypt?text=POLICY_ID.
2️⃣ Used the encrypted output as an access key.
3️⃣ Accessed /api/certificates/policies/{encrypted_string} to get policy PDFs.
4️⃣ Retrieved full policy details and demonstrated unauthorized access.
5️⃣ Reported the flaw.
🔗 Read Here
Steps:
1️⃣ Discovered unauthorized account creation by modifying a request.
2️⃣ Found unauthorized invitation deletion by replacing admin cookies with view-only user
cookies.
3️⃣ Tested other CRUD operations and identified additional IDOR vulnerabilities.
4️⃣ Reported them all.
🔗 Read Here
Steps:
1️⃣ Discovered an API for managing company members.
2️⃣ Found a PUT request to /api/roles/<role_id> that assigns roles.
3️⃣ Modified subjects to include a victim’s user ID.
4️⃣ Successfully added the victim without their consent.
5️⃣ Reported the issue.
🔗 Read Here
Steps:
1️⃣ Identified an export feature that generates reports.
2️⃣ Captured a request with a backgroundJobId.
3️⃣ Noticed that the report URL contained this backgroundJobId.
4️⃣ Used Burp Suite’s Intruder to brute-force valid backgroundJobId values.
5️⃣ Successfully accessed other users’ reports.
6️⃣ Reported the vulnerability.
🔗 Read Here
Steps:
1️⃣ Logged in as a regular user.
2️⃣ Captured a profile update request.
3️⃣ Modified fields like email and roles.
4️⃣ Submitted the request and got a 200 OK response.
5️⃣ Confirmed unauthorized changes and reported it.
🔗 Read Here
Steps:
1️⃣ Discovered an email template edit function.
2️⃣ Intercepted and decoded the request.
3️⃣ Injected an XSS payload <img/src=x onload=confirm(1)>.
4️⃣ Modified eventID to a victim’s ID.
5️⃣ Successfully executed stored XSS.
6️⃣ Verified account takeover potential and reported it.
🔗 Read Here
Steps:
1️⃣ Found an unauthenticated API exposing consumer details.
2️⃣ Two endpoints allowed attackers to retrieve consumer numbers and sensitive data.
3️⃣ Used brute-force techniques to extract users’ personal information.
4️⃣ Discovered a 0-click account takeover via OTP response manipulation.
5️⃣ Confirmed that mobile numbers were used as session cookies.
6️⃣ Successfully took over accounts without OTP verification.
7️⃣ Reported the severe security flaw.
The login flow is flawed, as the mobile number is used as a session cookie.
Attackers can manipulate the server response after entering a wrong OTP to gain unauthorized
access.
No OTP verification is required, making account takeover trivial.
Impact: Full account takeover, exposing critical personal details such as name, email, address,
PAN, voter ID, and Aadhaar number.
Here’s a breakdown of IDOR vulnerabilities from cases 1️1️ to 1️7️, similar to the previous ones:
🔗 Read Here
Steps:
1️⃣ Captured a GraphQL request using Burp Suite from an embedded submission form.
2️⃣ Identified the uuid parameter in the request.
3️⃣ Modified uuid with a random inactive UUID and still received sensitive program details.
4️⃣ Used Wayback Machine to extract old UUIDs and tested them for access.
5️⃣ Successfully accessed private program names, scope details, and response efficiency rates.
6️⃣ Reported the issue to HackerOne.
🔗 Read Here
Steps:
13. IDOR in ‘v’ Parameter Exposes All Users’ PII ($1,800 Bounty)
🔗 Read Here
Steps:
vnnt {xrjo} nnnr {tgx} ntkx {tgyj} yinvr {mrzo} jyg {tnkxn} ugor {qnjn} zyjr
{irgirnittghn}
By modifying characters outside the curly braces, different users’ data can be accessed:
1. vnnt {xrjo} mqrn {tgx} ntkx {tgyj} yinvr {mrzo} jyg {tnkxn} ugor {qnjn}
zyjr {irgirnittghn}
2. qrnt {xrjo} nnnr {tgx} ntkx {tgyj} yinvr {mrzo} jyg {tnkxn} ugor {qnjn}
zyjr {irgirnittghn}
🔗 Read Here
Steps:
1️⃣ Found an image upload feature where each user had a profile ID.
2️⃣ Noticed that modifying /profile/1000 to /profile/1002 returned another user’s images.
3️⃣ Uploaded an image as User A, then accessed User B’s profile using a simple IDOR.
4️⃣ Confirmed the ability to overwrite other users’ profile pictures.
5️⃣ Reported the vulnerability.
🔗 Read Here
Steps:
1️⃣ The owner of a project could create private folders, files, and review links.
2️⃣ A search function was available for both owners and collaborators.
3️⃣ Removed the search query from the request (q parameter).
4️⃣ Received a leak of all owner metadata and invite links.
5️⃣ Used the invite links to gain unauthorized access to private data.
6️⃣ Reported the issue and secured a high bounty.
🔗 Read Here
Example 1: IDOR in Transaction Receipt Retrieval
Steps:
1️⃣ Admin could add new users via an API request containing:
CSRF Token
Request ID (RQ-ID)
Auth Token
2️⃣ Removing RQ-ID and CSRF Token caused a 403 Forbidden error.
3️⃣ Removing only the Auth Token allowed the request to proceed successfully.
4️⃣ Extracted a victim’s account ID and used it in the request.
5️⃣ Bypassed authentication, granting admin access to another user’s account.
6️⃣ Reported the security flaw.
Based on an analysis of various HackerOne reports, IDOR vulnerabilities are frequently found
in:
While some believe that IDOR is an easy vulnerability to find, it actually requires creativity
and skill to identify effectively. In fact, IDOR often leads to higher bug bounties than Privilege
Escalation (Privesc), SQL Injection (SQLi), or Code Injection due to its impact.
Not all IDs are sequential. Sometimes, IDs must be extracted from different sources. ✅
Example: Extracting an ID from an asset link (Report 404797).
https://hackerone.com/reports/404797
IDs can sometimes be hidden in: 🔹 JavaScript source code 🔹 Hidden input fields 🔹 API
responses ✅ Example: Finding IDs in a Twitter-like platform’s source code (Report 181748).
https://hackerone.com/reports/181748
🔹 Are IDs visible as plaintext or encoded (e.g., Base64)? ✅ Example: Report 291721.
4. Direct File/Resource Access Without Authentication
If files or documents are accessible via direct URLs, they may be vulnerable. ✅ Examples:
Report 94790
Report 258260 (IDOR on an image)
Report 230328
https://hackerone.com/reports/258260
A vulnerability patched on the main site may still exist on: 🔹 Regional versions 🔹 Different
API endpoints ✅ Examples:
Report 876300
Report 715054
Report 271393
🔹 Changing request methods (GET → POST, POST → PUT) can reveal IDOR vulnerabilities.
✅ Examples:
Report 199321
Report 204984
Report 297751
Report 152407
Report 262661
Report 587687
https://hackerone.com/reports/152407
IDOR vulnerabilities can have serious consequences beyond just account takeovers (P1 bugs).
Other significant impacts include:
🛑 Some IDORs expose sensitive user data, such as email addresses. ✅ Example: Report
293490 (Leaks user emails).
https://hackerone.com/reports/293490
💰 IDOR can allow attackers to bypass payment verification. ✅ Example: Report 391092.
https://hackerone.com/reports/391092
🔹 Attackers can initiate actions as another user without consent. ✅ Example: Report
1005020.
Report 156537
Report 264754
Report 153905
✅ IDOR vulnerabilities extend beyond simple ID parameter tampering. ✅ 80% of IDORs are
found in REST APIs, GET parameters, or POST bodies. ✅ Creativity is key—try encoding
tricks, alternate domains, and HTTP method changes. ✅ IDOR impact is vast, including
PII leaks, payment bypasses, and asset manipulation.
🔎 By thinking outside the box and testing different scenarios, you can significantly increase
your chances of discovering valuable IDOR vulnerabilities.
📌 For a full in-depth write-up, check out this amazing article: 🔗 What I Learned from
Reading 220 IDOR Bug Reports
The lab stores user chat logs on the server's file system.
These chat logs are retrieved using static URLs.
The goal is to find the password of the user "carlos" and log into their account.
When clicking View transcript, a GET request is sent to retrieve a chat log.
The request is structured like this:
GET /download-transcript/2.txt HTTP/1.1
Host: vulnerable-website.com
The chat log file name increments with each request (e.g., 2.txt, 3.txt, etc.).
Since the parameter directly references a file and increments, there’s a chance that earlier
logs (like 1.txt) belong to another user.
Using Burp Suite, intercept the request and modify the parameter:
Original request:
Modified request:
If the server lacks proper Access Control, it will return another user’s chat log.
If the altered request succeeds, it retrieves the chat log from another user (Carlos).
The chat log contains Carlos' password.
IDOR (Insecure Direct Object Reference) occurs when access to a resource (file, record, or
function) is determined solely by a user-controllable parameter.
The vulnerability in this case was that the server did not verify if the requesting user was
authorized to access certain chat logs.
Similar vulnerabilities can exist in different scenarios:
o Invoices: http://example.com/somepage?invoice=001
o Password changes: http://example.com/changepassword?user=abg
o File downloads: http://example.com/downloadFile?fileName=1.txt
o Accessing restricted pages: http://example.com/accessPage?item=i-14
For more understanding you can also read the below writeup:
https://medium.com/@aysebilgegunduz/everything-you-need-to-know-about-
idor-insecure-direct-object-references-375f83e03a87
Case Study: IDOR Reports on HackerOne
Here’s the refined version with the Insider PhD video link included:
📌 GitHub Repositories
Explore different vulnerability types and analyze complete reports. Feel free to skip reports that
seem too easy.
HackerOne Reports
Awesome Bugbounty Writeups
Awesome Google VRP Writeups
HackerOneReports
A collection of high bounty reports related to Insecure Direct Object Reference (IDOR).
🎥 Additional Learning
Insecure Direct Object References (IDOR) remain one of the most critical security
vulnerabilities, often leading to severe data breaches if left unaddressed. Throughout this deep
dive, we have explored various aspects of IDOR, from identification and exploitation techniques
to mitigation strategies and real-world case studies. By leveraging manual testing, automated
tools, and expert insights, security professionals can effectively detect and remediate these
vulnerabilities. As organizations continue to strengthen their security posture, prioritizing IDOR
prevention through secure coding practices, rigorous access controls, and continuous monitoring
is essential. Understanding and addressing IDOR not only enhances application security but also
safeguards user data and organizational integrity in an increasingly threat-prone digital
landscape.