Skip to content
IDOR Write-up Beginner

Worth $1,500 IDOR (Access Unauthorize Data)

A hidden id parameter on a user account endpoint was not checked against the logged-in user, so changing the numeric value returned another user's account data. An attacker could read other users' information by simply altering the number.

Muhammad Asim Shahzad Follow

Published on web.archive.org

Bounty$1,500 View original

#### protector47

protector47, on web.archive.org

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 5 min read.

Context

This is a write-up of an Insecure Direct Object Reference (IDOR) finding by Muhammad Asim Shahzad, known as "protector47", published on 20 December 2020. The target was a private bug bounty program, so the program name and the real host are not disclosed. The researcher refers to the site throughout as www.abc.com and states plainly that he is bound not to name the program.

The affected feature is the user account area of the application, reached at the endpoint /users/account/. The endpoint is the account area of the application, at /users/account/. The finding is that the page also accepts an id parameter that selects which user's data is returned, and that the application does not check whether the caller is allowed to read that user's record.

Image for post
Image for post From the original on web.archive.org

The author opens with a short definition of IDOR: an access control vulnerability in which unvalidated user input is used for unauthorised access to resources or operations. He notes that exploitation can be as simple as manually changing a URL parameter, while finding the issue can be hard. He lists three conditions that must all hold for the vulnerability to exist:

  1. The application reveals a direct reference to an internal resource or operation.
  2. The user is able to manipulate a URL or form parameter to modify the direct reference.
  3. The application grants access to the internal object without checking if the user is authorised.

He also lists four IDOR types, which frame what an attacker can do once the reference is manipulable:

  • Obtaining unauthorised data access: exposed object references reveal direct database IDs, allowing retrieval of records with sensitive information. Database key names and values can also feed SQL injection payloads.
  • Performing unauthorised operations: manipulating unvalidated user ID values, command names or API keys can force a password change to take over an account, run administrative commands to add users or escalate privileges, or reach paid-for or rate-limited APIs and features.
  • Manipulating application objects: access to internal object references lets an unauthorised user change the internal state and data of the application, for example tampering with session variables to alter data, elevate privileges or reach restricted functionality.
  • Getting direct access to files: typically combined with path traversal, this lets an attacker manipulate file system resources, upload files, manipulate other users' data or download paid content for free.

Setup

The report does not describe accounts, roles or versions. What it does give is the tooling and the precondition:

  • The program was old, and the researcher expected that common issues would either not be rewarded or would be closed as duplicates. That shaped his goal: he was looking specifically for a high severity vulnerability.
  • For parameter discovery he used two open source tools, Arjun and Parameth:
Text
https://github.com/s0md3v/Arjun
https://github.com/maK-/parameth
  • The researcher's own user ID on the target was 6781. This is the value he later changed.

Finding it

He started with information gathering, and singles out parameter brute-forcing as the technique that "takes you next level or reveals something unexpected". Before that, he tried XSS, SQLi and other manipulations on the application and found nothing. His own comment is that the application was quite secure, or that he did not have enough skills.

Image for post
Image for post From the original on web.archive.org

After enough fuzzing and enumeration, he moved to brute-forcing hidden parameters against the account endpoint:

Text
https://www.abc.com/users/account/

Arjun enumerated a parameter for him, ?id=, giving the URL:

Text
https://www.abc.com/users/account/?id=

The parameter was hidden, so it had to be discovered by brute force.

Exploitation

Step 1: Establish your own identifier

With his own session, the researcher's ID was 6781. The researcher's own ID was 6781.

Step 2: Change the identifier by one

He changed the user ID from 6781 to 6780:

The response contained another user's data. His reaction in the write-up is that it was "TOO SIMPLE", and he adds that it was simple but hard to discover because the parameter was hidden.

That is the whole exploit: one authenticated request with a decremented identifier. The report shows no request or response bodies, only the URL and the outcome.

Root cause

The application exposes a direct reference to an internal object, the user record, through the id query parameter on /users/account/, and it resolves that reference without verifying that the authenticated user is entitled to the object. This matches the third of the author's three conditions: access is granted to the internal object without an authorisation check.

Why the existing defences did not stop it is only implied. The parameter was hidden, and the researcher found it only through brute-forcing. That obscurity is not an access control: once the parameter name is known, any authenticated user can enumerate identifiers. The report does not describe any server-side ownership check.

Impact

The researcher accessed some other user's data by changing the identifier. The researcher accessed some other user's data by changing the identifier from 6781 to 6780.

The author's general framing of this IDOR type is unauthorised data access: exposed object references reveal direct database IDs and allow retrieval of records containing sensitive information. He does not claim any of the other IDOR consequences, such as unauthorised operations or file access, for this target.

Fix

The fix implied by the root cause is a server-side authorisation check on the object: the handler should derive the record from the authenticated session, or verify that the requested id belongs to the caller, before returning any data. Hiding or renaming the parameter is not a fix, since the researcher found it by brute force.

Variants to test

  • Hidden identifier parameters on account and profile endpoints. Brute-force parameter names with Arjun or Parameth against endpoints such as /users/account/, then substitute another user's identifier. A positive result is a response containing data that belongs to an account other than the one you are logged in as.
  • Sequential identifier walking. Once one identifier is confirmed to work, decrement and increment it. A positive result is a run of records for other users rather than an error or your own record repeated.
  • Identifier in different locations. The report only shows the query string. On other targets, try the same object reference in the path, in form fields and in JSON bodies, since the same missing check often appears wherever the object is referenced.
  • Other object types behind the same pattern. The author's taxonomy covers operations and files as well as data. Where an identifier selects an operation (password change, administrative action) or a file, test whether the same absence of an ownership check lets you act on or download another user's object.

Reward

The finding was rewarded with $1,500.

Image for post
Image for post From the original on web.archive.org

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 13 min read.

What happened, in plain words

A security researcher found a way to read other people's account data on a website by changing one number in a web address. The website was part of a private bug bounty program, which is a scheme where companies pay people to find and report security problems before criminals do. Because the program was private, the researcher is not allowed to name the company, so throughout his write-up he calls the site www.abc.com. He was paid $1,500 for the report.

The bug is called an Insecure Direct Object Reference, or IDOR. In everyday terms: imagine a hotel where every room key is just a number written on a card, and the reception desk hands out any room's key to anyone who asks for that number. Nothing stops you from asking for room 6780 instead of your own room 6781. The website worked the same way. Its account page accepted a number from the address bar, and changing it returned another user's data.

The researcher's own account number was 6781. He changed it to 6780 and saw someone else's data. That was the whole attack. Finding the number, however, took work: the parameter was hidden, so he had to brute-force parameter names with special tools until one worked.

Image for post
Image for post From the original on web.archive.org

What an IDOR is

The author starts with a definition. An insecure direct object reference is an access control vulnerability where unvalidated user input is used for unauthorised access to resources or operations. Let us unpack that.

  • Access control is the part of a website that decides who is allowed to see or do what. When a site shows you your own orders and hides everyone else's, access control is doing its job.
  • User input is anything you send to the site: the address you type, the contents of a form, the values hidden in a link.
  • Unvalidated means the site takes that input and acts on it without checking whether it makes sense or whether you are allowed to ask for it.
  • A resource or operation is a thing the site holds (a record, a file, a photo) or an action it can perform (change a password, delete an item).

A direct object reference is when the site points at one of those things using a simple, guessable name, such as a number. Your account might be record number 6781 in the site's database. If the site lets you say "give me record 6780" and does not check that record 6780 belongs to you, that is an IDOR.

The author says exploitation can be as simple as manually changing a URL parameter, while finding the issue can be hard. A URL parameter is the part of a web address after a question mark that carries extra information, like ?id=6781. You can edit it by hand in the browser's address bar and press Enter.

He lists three conditions that must all hold for the vulnerability to exist:

  1. The application reveals a direct reference to an internal resource or operation.
  2. The user is able to manipulate a URL or form parameter to modify the direct reference.
  3. The application grants access to the internal object without checking if the user is authorised.

In plain words: the site must use a guessable name for something private (condition 1), you must be able to change that name (condition 2), and the site must not check whether you are allowed to have the thing you named (condition 3). Remove any one of the three and there is no bug. If the name were unguessable, or you could not change it, or the site checked ownership, the attack would fail.

The four kinds of IDOR

The author groups what an attacker can do once the reference is manipulable into four types. These are general categories from the security world, not four separate findings on this target.

  • Obtaining unauthorised data access. Exposed object references reveal direct database IDs, allowing retrieval of records containing sensitive information. Database key names and values can also be used to prepare SQL injection payloads. A database is where a website stores its information in tables, a bit like a spreadsheet. A key is the column that identifies a row, such as the user ID. SQL injection is a separate attack where crafted input tricks the database into running commands the site did not intend; knowing real key names helps an attacker build such input.
  • Performing unauthorised operations. Manipulating unvalidated user ID values, command names or API keys can force a password change to take over an account, run administrative commands to add users or escalate privileges, or reach paid-for or rate-limited APIs and features. An API (application programming interface) is the behind-the-scenes channel a website's pages use to talk to its servers; it accepts requests and returns data, often in a machine-readable form. An API key is a secret string that identifies an application, like a password for software. Escalate privileges means gaining more power on the site than you were given, for example becoming an administrator.
  • Manipulating application objects. Access to internal object references lets an unauthorised user change the internal state and data of the application, for example tampering with session variables to alter data, elevate privileges or reach restricted functionality. A session is the site's memory of who you are while you are logged in; a session variable is a piece of that memory, such as your user ID or your role.
  • Getting direct access to files. Typically combined with path traversal, this lets an attacker manipulate file system resources, upload files, manipulate other users' data or download paid content for free. Path traversal is an attack where input like ../ is used to climb out of the intended folder and reach other files on the server.

For this target the author only claims the first type: unauthorised data access. He does not claim the other three.

How he found it

He begins with information gathering, and singles out parameter brute-forcing as the technique that "takes you next level or reveals something unexpected". Information gathering means learning how a site is built before attacking it: what pages exist, what they accept, how they respond. Brute-forcing means trying many possibilities automatically instead of reasoning them out, the way you might try every combination on a suitcase lock rather than guess the owner's birthday.

He was looking for a high severity vulnerability because the program was old and he knew the common issue will not be rewarded or it will become duplicate. A duplicate is a report of a bug someone else already reported; programs usually pay only the first reporter. Severity is how damaging a bug is judged to be, from low to critical.

He tried everything like XSS, SQLi, and other manipulations but was unable to find anything in the application. His own comment is that the application was quite secure, or that he did not have enough skills. XSS (cross-site scripting) is an attack where you get your own code to run in another user's browser. SQLi is the database attack described above.

Image for post
Image for post From the original on web.archive.org

After enough fuzzing and enumeration, he started brute-forcing hidden parameters. Fuzzing is sending large numbers of varied inputs to see how the site reacts. Enumeration is listing things one by one, such as every possible parameter name. A hidden parameter is one the site accepts but never shows you in its pages or links, so you cannot discover it by clicking around.

The endpoint he attacked was:

Text
https://www.abc.com/users/account/

An endpoint is a specific address on a server that accepts requests, like a particular counter in a large office. This one is the account area of the site. The address breaks down as follows: https is the secure version of the protocol browsers use to fetch pages; www.abc.com is the site's name (a stand-in here); /users/account/ is the path that identifies the account page on that site.

To find hidden parameters he used two open source tools, Arjun and Parameth:

Text
https://github.com/s0md3v/Arjun
https://github.com/maK-/parameth

These are the projects' addresses on GitHub, a site where software source code is published. Open source means the code is public and free to use. The report names both tools for parameter brute-forcing but does not describe how they work. A parameter that changes the response is a parameter the site accepts. You do not need to install anything to follow the story; the point is that the name was found by automated guessing, not by reading the site.

Arjun enumerated a parameter for him, ?id=, giving the URL:

Text
https://www.abc.com/users/account/?id=

Line by line: https://www.abc.com is the site; /users/account/ is the account page; the ? marks the start of the query string, the part of a URL that carries parameters; id= is a parameter named id with an empty value. The name id is short for identifier, a number that names a record. Nothing in the visible page had suggested the account view took an identifier from the address, which is why it had to be discovered by brute force.

The exploitation, step by step

Step 1: establish your own identifier

The researcher's own ID was 6781. This step matters because it proves two things: the site honours the id parameter, and the number maps to an account record. Before this, ?id= was only a guess that something changed; now it is confirmed to select a user.

A logged-in session is the state of being signed in. The browser holds a cookie, a small piece of data the site stored in your browser when you logged in, and sends it with every request so the site knows who you are. Think of it as a wristband at an event: you show it once at the gate, and staff recognise you afterwards without asking for your ticket again.

Step 2: change the identifier by one

He changed the user ID from 6781 to 6780:

Line by line: the site and path are unchanged, so the request still goes to the account page; only the value after id= differs, now 6780 instead of 6781.

The response contained another user's data. An ownership check is the server-side test that asks "does this record belong to the person making the request?". It was missing. His reaction in the write-up is that it was "TOO SIMPLE", and he adds that it was simple but hard to discover because the parameter was hidden.

That is the whole exploit: one authenticated request with a decremented identifier. The report shows no request or response bodies, only the URL and the outcome, so we do not know which fields the page displayed.

Why it worked

The application exposes a direct reference to an internal object, the user record, through the id query parameter on /users/account/, and it resolves that reference without verifying that the authenticated user is entitled to the object. This matches the third of the author's three conditions: access is granted to the internal object without an authorisation check.

Why the existing defences did not stop it is only implied. The parameter was hidden, and the researcher found it only through brute-forcing. That obscurity is not an access control: once the parameter name is known, any authenticated user can enumerate identifiers. The report does not describe any server-side ownership check. In everyday terms, the hotel clerk checked that you had a key card, but never checked that the room number on it was yours.

What the impact was

The researcher accessed some other user's data by changing the identifier. The researcher accessed some other user's data by changing the identifier from 6781 to 6780. Walking the identifier space means simply trying 6779, 6778, 6777 and so on, or scripting it, which turns one lucky guess into a systematic harvest. The report does not state which fields the account page returns, so the exact sensitivity of the exposed data is not described here.

The author's general framing of this IDOR type is unauthorised data access: exposed object references reveal direct database IDs and allow retrieval of records containing sensitive information. He does not claim any of the other IDOR consequences, such as unauthorised operations or file access, for this target.

How it should be fixed

The fix implied by the root cause is a server-side authorisation check on the object: the handler should derive the record from the authenticated session, or verify that the requested id belongs to the caller, before returning any data. In the hotel comparison, the clerk should look up which room your key card was issued for, rather than trusting the number you say out loud. Hiding or renaming the parameter is not a fix, since the researcher found it by brute force.

Similar things to test elsewhere

  • Hidden identifier parameters on account and profile endpoints. Brute-force parameter names with Arjun or Parameth against endpoints such as /users/account/, then substitute another user's identifier. A positive result is a response containing data that belongs to an account other than the one you are logged in as.
  • Sequential identifier walking. Once one identifier is confirmed to work, decrement and increment it. A positive result is a run of records for other users rather than an error or your own record repeated.
  • Identifier in different locations. The report only shows the query string. On other targets, try the same object reference in the path, in form fields and in JSON bodies, since the same missing check often appears wherever the object is referenced. JSON is a common text format for structured data, made of names and values in curly braces.
  • Other object types behind the same pattern. The author's taxonomy covers operations and files as well as data. Where an identifier selects an operation (password change, administrative action) or a file, test whether the same absence of an ownership check lets you act on or download another user's object.

The reward

The finding was rewarded with $1,500.

Image for post
Image for post From the original on web.archive.org

Glossary

  • Access control: the part of a website that decides who may see or do what.
  • API: the channel a website's pages use to talk to its servers, accepting requests and returning data.
  • API key: a secret string that identifies an application, like a password for software.
  • Arjun: an open source tool that guesses hidden URL parameter names against a target.
  • Brute-forcing: trying many possibilities automatically instead of reasoning them out.
  • Bug bounty program: a scheme where organisations pay people to find and report security problems.
  • Cookie: a small piece of data a site stores in your browser, often used to remember that you are logged in.
  • Database: where a website stores its information, in tables like a spreadsheet.
  • Direct object reference: a simple, guessable name a site uses to point at a record, file or action, such as a number.
  • Duplicate: a report of a bug that someone else already reported.
  • Endpoint: a specific address on a server that accepts requests.
  • Enumeration: listing things one by one, such as every possible parameter name.
  • Escalate privileges: gain more power on a site than you were given, such as administrator rights.
  • Fuzzing: sending large numbers of varied inputs to see how a site reacts.
  • Hidden parameter: a parameter a site accepts but never shows in its pages or links.
  • IDOR (Insecure Direct Object Reference): an access control vulnerability where unvalidated input is used to reach resources or operations the user is not entitled to.
  • Information gathering: learning how a site is built before attacking it.
  • JSON: a common text format for structured data, made of names and values in curly braces.
  • Key (database): the column that identifies a row, such as the user ID.
  • Open source: software whose source code is public and free to use.
  • Ownership check: the server-side test asking whether a record belongs to the person making the request.
  • Parameter: a name and value carried in a URL after a question mark, or in a form, that tells the site what you want.
  • Parameth: an open source tool that guesses hidden parameter names against a target.
  • Path traversal: an attack using input like ../ to climb out of the intended folder and reach other files.
  • Query string: the part of a URL after the question mark that carries parameters.
  • Session: the site's memory of who you are while you are logged in.
  • Session variable: a piece of that memory, such as your user ID or role.
  • Severity: how damaging a bug is judged to be, from low to critical.
  • SQL injection (SQLi): an attack where crafted input tricks a database into running unintended commands.
  • URL: a web address.
  • XSS (cross-site scripting): an attack where your own code is made to run in another user's browser.

More by Muhammad Asim Shahzad

View all

6 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Insecure direct object reference (IDOR)

The lesson behind this report.

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.