IDOR “Insecure direct object references”, my first P1 in Bugbounty
The application used numeric IDs in API requests without checking ownership, allowing an attacker to change the ID to access or delete other users' CMS instances and user accounts. The attacker could delete CMS content and user accounts, and collect personal data such as email, phone, and name.
First Whoami : Dris R. A Security Researcher, Penetration Tester from Paris ,France.
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.
Context
In summer 2022 I was doing web security research full time, and this post walks through the two IDOR findings I reported in the same bug bounty program. The first was rated P3: I could delete the CMS of every customer. The second was rated P1: I could delete all the users of the website and, along the way, collect their personal data (email, phone, name).

The target is a website that lets its users create and manage a CMS (Content Management System). Behind the front end it exposes an API, and the application identifies each user with a numeric ID. That numeric ID is the object reference that turned out not to be checked against the caller.
A short reminder of the rating scale I use throughout: vulnerabilities are assessed and categorised from P1 (most severe) to P5 (least severe), which determines how much an organisation should reward the researcher who reported it.
What an IDOR is
An IDOR (Insecure direct object references) flaw allows an attacker to gain unauthorised access to resources or perform actions on a web application.

It is accomplished by altering the request parameters supplied to the server while retrieving objects such as documents, files and data. It works when there is a lack of server-side validation and a request is completed without validating whether the object being requested belongs to the user requesting it.

The non-technical picture: you are logged in to your bank's website and you are only authorised to make transfers from accounts that belong to you, using your own money. With an IDOR you can potentially make transfers from accounts that do not belong to you, and therefore use money that is not yours, by changing just a single number in the URL.
Setup
There is no special tooling in this story. I logged in to the application with my own test account and captured all the requests with my proxy, then replayed the API requests that carried my numeric ID in Burp Repeater. The precondition is simply an authenticated account on the application.
Before that, while hunting in the program, I had reported some P4 findings and was bored of reporting only P4, so I decided to look for a critical vulnerability in the same program. As we say in French, "On ne sait jamais, sur un malentendu ca peut marcher", which translates as nothing ventured, nothing gained.
I wanted to find an IDOR specifically because the impact is high.
Finding it
After logging in again and capturing the traffic, three questions were in my head:
- How do they identify us?
- What are the sensitive features of the site?
- What are our restrictions?
Going through the requests in my proxy answered the first one: they identify us with a number ID. I then mapped the website (code, endpoints, technologies) and built a mental model of the backend, thinking about the mistakes developers could have made. Since they use an API, I sent every API request that contained my number ID to Repeater.
The website lets us create and manage a CMS, so I started playing with that functionality to see whether I could reach something that is forbidden.

Exploitation
Step 1: the baseline request
In front of me was a PUT request carrying my own test ID, 405.

Step 2: change the ID
The question was what happens if I modify the ID to another value, 419 instead of 405: do we bypass the security of the site and access prohibited data?
PUT /api/v1/cms/419 HTTP/2
The path segment after /api/v1/cms/ is the object reference. The server answered with a HTTP 200 OK, so it worked: I could access other customers' CMS when normally I am not allowed to.

Step 3: raise the impact with DELETE
Like any hacker I test all HTTP methods. When I tried the DELETE method I received a 200 OK, which means the CMS is deleted.


Step 4: confirm the deletion
I sent a PUT request to the resource again and this time received a 404 not found. It looks like the CMS is removed from the application, as we can no longer access this data.


Step 5: proof of concept
I went to the URL of the CMS to see it with my own eyes, and the site is no longer accessible.

We had managed to delete CMS that did not belong to us. This may have a financial impact, as the service is no longer available.
The bug bounty platform accepted this vulnerability as P3.

From P3 to P1: the same pattern on users
The DELETE method was effective, and maybe it could affect other resources. Let's take a look.
First, my own test account: are we authorised to access the data of other users? I sent a GET request to the server with my own test ID, 19795.


After that I changed the numeric ID to 19782, another user, to see whether we are authorised to do something.
GET /api/v1/users/19782
No, we are not authorised this time. We are starting to understand how the application works, so let's test the DELETE method. If it worked once, who knows, maybe it works again.
I changed the method to DELETE, sent the request, and received a 200 OK.


Proof of concept of user deletion
I sent the DELETE request again and received a 404 not found, so the user no longer exists in the website.

We had deleted the user, collected personal information, and we could do it for all users of the website, so yes, it is critical.
The bug bounty platform accepted this vulnerability as P1 this time.


That was my first P1, found with what I call "Jedus0r's methodology".

Root cause
The application identifies users by a numeric ID and exposes objects under predictable paths such as /api/v1/cms/{id} and /api/v1/users/{id}. The server does not validate, on each request, whether the object being requested belongs to the user making the request. The report does not show the server-side code, so the exact implementation is not stated; what the behaviour shows is that the object reference from the URL is used directly, without an ownership check tied to the authenticated session.
The GET on another user's ID was refused, while the DELETE on the same object returned 200 OK. The report does not explain why the two behaved differently.
Impact
Two distinct impacts were demonstrated in the same program:
| Finding | Action | Result | Rating |
|---|---|---|---|
| CMS of other customers | PUT with a foreign ID | 200 OK, access to another customer's CMS | P3 |
| CMS of other customers | DELETE with a foreign ID | 200 OK, CMS removed, later 404 | P3 |
| Users of the website | GET with a foreign ID | not authorised | n/a |
| Users of the website | DELETE with a foreign ID | 200 OK, user removed, later 404 | P1 |
On the CMS side, an attacker could delete CMS instances that did not belong to them, and the report notes this may have a financial impact because the service is no longer available to the customer. On the user side, an attacker could delete any user of the website and, in the meantime, collect their personal data (email, phone, name). The report states this could be done for all users of the website, which is why it was rated critical.
The conditions are the ones shown: an authenticated account, a numeric object ID, and a request path that accepts the ID from the client.
Fix
The fix that the behaviour calls for is a server-side ownership check on every object access, applied uniformly to every HTTP method: before acting on /api/v1/cms/{id} or /api/v1/users/{id}, resolve the object and confirm that it belongs to the authenticated user (or that the user holds the role required to act on it), and return an authorisation error otherwise. The GET path already behaved this way; the PUT and DELETE paths need the same check. Relying on unguessable identifiers instead of an ownership check is not a substitute.
Variants to test
- Method switching on the same object. Take an endpoint where GET on a foreign ID is refused and replay it with PUT, PATCH and DELETE. A positive result is any 2xx on an object you do not own, followed by a 404 or a changed state when you read it back.
- Nested and child resources. If
/api/v1/users/{id}is protected, try/api/v1/users/{id}/settings,/api/v1/users/{id}/documentsand similar. A positive result is data or a state change belonging to another user. - Identifier in other places. Move the same numeric ID from the path into a query string, a JSON body field or a header. A positive result is the same object returned or modified when the ID is supplied elsewhere.
- Sequential enumeration. Walk IDs around your own. A positive result is a run of 2xx responses for objects that are not yours.
- Bulk and export endpoints. Look for endpoints that accept a list of IDs or an export parameter. A positive result is records for IDs outside your account appearing in the response.
- State-changing side effects. After a successful foreign PUT or DELETE, re-read the object and check the customer-facing page, as the report did. A positive result is a 404 or a visibly broken page that confirms the change persisted.
What happened, in plain words
In the summer of 2022 I was spending my time on web security research, and this post is the story of two bugs I found in the same bug bounty program. A bug bounty program is a scheme where a company invites outside researchers to look for security problems in its systems and pays them for reporting what they find. The company sorts each report by severity, from P1 (the most serious) down to P5 (the least serious), and that rating decides how much the researcher is rewarded.
The first bug I found was rated P3: I could delete the CMS of every customer of the site. A CMS, or Content Management System, is the tool a site owner uses to write, edit and publish the pages of their website. Deleting someone else's CMS means their website disappears.
The second bug was rated P1: I could delete all the users of the website and, along the way, collect their personal data, such as email, phone and name.

The site I was testing lets its users create and manage a CMS. Behind the visible pages it runs an API. An API is the part of a website that answers requests from programs rather than drawing pages for people: you send it a request describing what you want, and it sends back data. The application identifies each user with a numeric ID, a plain number. That number is the key to both bugs: the server took the number from my request and acted on whatever object it pointed to, without checking that the object belonged to me.
What an IDOR is
An IDOR (Insecure direct object references) flaw allows an attacker to gain unauthorised access to resources or perform actions on a web application.

It is accomplished by altering the request parameters supplied to the server while retrieving objects such as documents, files and data. It works when there is a lack of server-side validation and a request is completed without validating whether the object being requested belongs to the user requesting it.

In everyday terms: imagine a cloakroom where every coat has a numbered ticket. If the attendant hands out any coat whose number you ask for, without checking that the ticket is yours, you can walk off with someone else's coat just by saying a different number. An IDOR is exactly that, except the number sits in a web request and the coat is a record in a database.
The non-technical picture from the report: you are logged in to your bank's website and you are only authorised to make transfers from accounts that belong to you, using your own money. With an IDOR you can potentially make transfers from accounts that do not belong to you, and therefore use money that is not yours, by changing just a single number in the URL.
Setup
Before this, while hunting in the program, I had reported some P4 findings and was bored of reporting only P4, so I decided to look for a critical vulnerability in the same program. As we say in French, "On ne sait jamais, sur un malentendu ca peut marcher", which translates as nothing ventured, nothing gained.
I wanted to find an IDOR specifically because the impact is high.
There is no special tooling in this story beyond two things. The first is a proxy: a program that sits between your browser and the website and lets you read, pause and edit every request and response that passes through. The second is Burp Repeater, a pane inside the Burp proxy suite where you paste a captured request, change a value, and send it again as many times as you like. The precondition is simply an authenticated account on the application. Authenticated means logged in with a real account.
Finding it
After logging in again and capturing the traffic, three questions were in my head:
- How do they identify us?
- What are the sensitive features of the site?
- What are our restrictions?
Going through the requests in my proxy answered the first one: they identify us with a number ID. I then mapped the website (code, endpoints, technologies) and built a mental model of the backend, thinking about the mistakes developers could have made. An endpoint is one address the API answers on, such as /api/v1/cms/405; mapping them means listing the addresses the site uses and what each one does. Since they use an API, I sent every API request that contained my number ID to Repeater.
The website lets us create and manage a CMS, so I started playing with that functionality to see whether I could reach something that is forbidden.

Exploitation
Step 1: the baseline request
In front of me was a PUT request carrying my own test ID, 405.

A PUT request is one of the standard HTTP methods, the verbs a browser and a server use to talk. GET asks for something to be read, PUT asks for something to be created or replaced, DELETE asks for something to be removed. The baseline is my own object, so whatever the server answers here is the normal, allowed behaviour. Everything after this is measured against it.
Step 2: change the ID
The question was what happens if I modify the ID to another value, 419 instead of 405: do we bypass the security of the site and access prohibited data?
PUT /api/v1/cms/419 HTTP/2
Line by line: PUT is the verb, the action I am asking the server to perform. /api/v1/cms/419 is the path, the address of the thing I want to act on: the cms collection, version 1 of the API, and the object numbered 419. HTTP/2 is the version of the protocol used to carry the request. The only thing I changed compared with my own request is the last number: 405 became 419.
The path segment after /api/v1/cms/ is the object reference. The server answered with a HTTP 200 OK, so it worked: I could access other customers' CMS when normally I am not allowed to. HTTP 200 OK is the standard code for "done, here is the result"; a refusal would normally come back as 401 or 403.

Step 3: raise the impact with DELETE
Like any hacker I test all HTTP methods. When I tried the DELETE method I received a 200 OK, which means the CMS is deleted.


Reading and writing someone else's data is already bad, but deleting it is worse, so the next question was whether the same missing check also covered the verb that removes things.
Step 4: confirm the deletion
I sent a PUT request to the resource again and this time received a 404 not found. It looks like the CMS is removed from the application, as we can no longer access this data.


HTTP 404 not found means the server no longer knows about that address. Sending the same request again is the confirmation step: a 200 on the delete only says the server accepted the command, a 404 afterwards says the object really is gone.
Step 5: proof of concept
I went to the URL of the CMS to see it with my own eyes, and the site is no longer accessible.

A proof of concept is the evidence you attach to a report so the company can see the bug for itself rather than take your word for it. Here it is the customer-facing page failing to load.
We had managed to delete CMS that did not belong to us. This may have a financial impact, as the service is no longer available.
The bug bounty platform accepted this vulnerability as P3.

From P3 to P1: the same pattern on users
The DELETE method was effective, and maybe it could affect other resources. Let's take a look.
First, my own test account: are we authorised to access the data of other users? I sent a GET request to the server with my own test ID, 19795.


After that I changed the numeric ID to 19782, another user, to see whether we are authorised to do something.
GET /api/v1/users/19782
Line by line: GET asks to read something. /api/v1/users/19782 points at the users collection and the user numbered 19782, which is not me. No, we are not authorised this time. We are starting to understand how the application works, so let's test the DELETE method. If it worked once, who knows, maybe it works again.
I changed the method to DELETE, sent the request, and received a 200 OK.


This is the interesting part: the read was refused, but the delete on the same object was accepted.
Proof of concept of user deletion
I sent the DELETE request again and received a 404 not found, so the user no longer exists in the website.

We had deleted the user, collected personal information, and we could do it for all users of the website, so yes, it is critical.
The bug bounty platform accepted this vulnerability as P1 this time.


That was my first P1, found with what I call "Jedus0r's methodology".

Root cause
The application identifies users by a numeric ID and exposes objects under predictable paths such as /api/v1/cms/{id} and /api/v1/users/{id}. The server does not validate, on each request, whether the object being requested belongs to the user making the request. The report does not show the server-side code, so the exact implementation is not stated; what the behaviour shows is that the object reference from the URL is used directly, without an ownership check tied to the authenticated session. A session is how the server remembers that a series of requests comes from the same logged-in person, usually through a cookie, a small piece of data the browser stores and sends back with every request.
The GET on another user's ID was refused, while the DELETE on the same object returned 200 OK. The report does not explain why the two behaved differently.
Impact
Two distinct impacts were demonstrated in the same program:
| Finding | Action | Result | Rating |
|---|---|---|---|
| CMS of other customers | PUT with a foreign ID | 200 OK, access to another customer's CMS | P3 |
| CMS of other customers | DELETE with a foreign ID | 200 OK, CMS removed, later 404 | P3 |
| Users of the website | GET with a foreign ID | not authorised | n/a |
| Users of the website | DELETE with a foreign ID | 200 OK, user removed, later 404 | P1 |
On the CMS side, an attacker could delete CMS instances that did not belong to them, and the report notes this may have a financial impact because the service is no longer available to the customer. On the user side, an attacker could delete any user of the website and, in the meantime, collect their personal data (email, phone, name). The report states this could be done for all users of the website, which is why it was rated critical.
The conditions are the ones shown: an authenticated account, a numeric object ID, and a request path that accepts the ID from the client.
Fix
The fix that the behaviour calls for is a server-side ownership check on every object access, applied uniformly to every HTTP method: before acting on /api/v1/cms/{id} or /api/v1/users/{id}, resolve the object and confirm that it belongs to the authenticated user (or that the user holds the role required to act on it), and return an authorisation error otherwise. The GET path already behaved this way; the PUT and DELETE paths need the same check. Relying on unguessable identifiers instead of an ownership check is not a substitute.
Variants to test
- Method switching on the same object. Take an endpoint where GET on a foreign ID is refused and replay it with PUT, PATCH and DELETE. A positive result is any 2xx on an object you do not own, followed by a 404 or a changed state when you read it back.
- Nested and child resources. If
/api/v1/users/{id}is protected, try/api/v1/users/{id}/settings,/api/v1/users/{id}/documentsand similar. A positive result is data or a state change belonging to another user. - Identifier in other places. Move the same numeric ID from the path into a query string, a JSON body field or a header. A positive result is the same object returned or modified when the ID is supplied elsewhere.
- Sequential enumeration. Walk IDs around your own. A positive result is a run of 2xx responses for objects that are not yours.
- Bulk and export endpoints. Look for endpoints that accept a list of IDs or an export parameter. A positive result is records for IDs outside your account appearing in the response.
- State-changing side effects. After a successful foreign PUT or DELETE, re-read the object and check the customer-facing page, as the report did. A positive result is a 404 or a visibly broken page that confirms the change persisted.
Glossary
- API: the part of a website that answers requests from programs, sending back data instead of drawing pages for people.
- Authenticated: logged in with a real account, so the server knows who you are.
- Authorisation: the decision about whether a logged-in user is allowed to do a particular thing.
- Bug bounty program: a scheme where a company invites outside researchers to find security problems and pays for reports.
- Burp Repeater: a pane in the Burp proxy suite where you paste a captured request, edit it and send it again.
- CMS (Content Management System): the tool a site owner uses to write, edit and publish the pages of their website.
- Cookie: a small piece of data the browser stores and sends back with every request, often used to remember a session.
- DELETE: the HTTP method that asks the server to remove something.
- Endpoint: one address the API answers on, such as
/api/v1/cms/405. - GET: the HTTP method that asks the server to read something.
- Handler: the piece of code that runs for one particular verb on one particular address.
- HTTP: the protocol browsers and servers use to exchange requests and responses.
- HTTP 200 OK: the standard response code meaning the request succeeded.
- HTTP 404 not found: the standard response code meaning the server no longer knows about that address.
- IDOR (Insecure direct object references): a flaw where the server acts on an object named in the request without checking that the object belongs to the caller.
- Multi-tenant: one installation of an application serving many separate customers, each with their own data.
- P1 to P5: the severity scale used by bug bounty programs, P1 being the most serious and P5 the least.
- Proof of concept: the evidence attached to a report so the company can see the bug for itself.
- Proxy: a program that sits between your browser and the website and lets you read, pause and edit every request and response.
- PUT: the HTTP method that asks the server to create or replace something.
- Rate limiting: a server-side control that caps how many requests you may send in a period of time.
- Sequential: numbered one after another, so a neighbour's number is easy to guess.
- Session: how the server remembers that a series of requests comes from the same logged-in person.
- Severity: how serious a vulnerability is judged to be.
- Vulnerability: a weakness in an application that someone can abuse to do something they should not be able to do.