Insecure Direct Object Reference vulnerability
The endpoint for removing an external participant from a bug report did not verify that the user was actually a participant. An attacker could change the user ID in the request to send removal notification emails to any user, potentially on a mass scale.
Originally disclosed on HackerOne
- Triaged in under an hour
- Fixed in 16 days
- Paid in 16 days
- Disclosed after 16 days
In the program portal, there is an option to add external people as participants in a bug report. The admin can then remove this person as well if needed.
The request for removing an external reporter looks like:
DELETE /reports/<report_id>/external_users/<user_id> HTTP/1.1
Host: hackerone.com
User-Agent: <redacted>
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
X-CSRF-Token: <redacted>
X-Requested-With: XMLHttpRequest
Referer: <redacted>
Cookie: <redacted>
Connection: keep-alive
It was observed that by simply changing the value of <user_id> in the above URL, it is possible to generate a delete notification for the user associated with that particular user id even though that user was never invited as a participant for that bug report in the first place.
Possible Impact(s):
-
Due to the above request being sent, an email gets sent via the HackerOne portal to that particular user notifying them of their removal. See screenshot 1. It is possible to send such emails on a mass scale to all HackerOne users. I haven't tried this but I think this can be done. The email originating from the HackerOne platform will look legitimate but the users will be clueless as to what caused their removal from a report to which they were never invited.
-
A malicious admin can possibly generate notifications within a bug report of removing participants which they never added which might be a little confusing to other admins/participants. See screenshot 2 where I was able to remove certain folks without inviting them. I apologize for the 2 emails that were sent out to two different HackerOne researchers accidentally. I was just testing and didn't realize that this would actually work.
Cheers! /ab
Attachments

Context
The target is the HackerOne program portal, specifically the feature that lets a program add external people as participants in a bug report. An admin of the program can invite an external user to a report and later remove that person again when they are no longer needed. The removal is performed by a DELETE request against a report-scoped URL that carries both the report identifier and the user identifier.
The report describes an insecure direct object reference in that removal endpoint: the server acted on whatever <user_id> appeared in the URL without checking that the user had ever been invited to the report in question.
Setup
The request requires an admin session on a program, the role that can add and remove external participants on a report. The request was issued from the portal with the usual browser headers, including a CSRF token and the session cookie, both of which are redacted in the report. No specific tooling, version or additional precondition is described.
Finding it
The starting point is the legitimate removal request that the portal sends when an admin removes an external reporter from a report:
DELETE /reports/<report_id>/external_users/<user_id> HTTP/1.1
Host: hackerone.com
User-Agent: <redacted>
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
X-CSRF-Token: <redacted>
X-Requested-With: XMLHttpRequest
Referer: <redacted>
Cookie: <redacted>
Connection: keep-alive
The URL contains two object references: <report_id> for the report and <user_id> for the participant being removed. The researcher observed that simply changing the value of <user_id> produced a delete notification for the user tied to that identifier, even though that user had never been invited as a participant on that bug report. In other words, the report identifier stayed the same while the user identifier was swapped for one that had no relationship to the report.
Exploitation
Step 1: Capture the legitimate removal request
As an admin, remove an external participant from a report and capture the resulting request. It is the DELETE shown above, with the report identifier and the invited user's identifier in the path.
Step 2: Swap the user identifier
Change <user_id> in the path to the identifier of a user who was never invited to that report, and send the request with the same session and CSRF token. The server processes the deletion for that user identifier.
Step 3: Observe the notification
The consequence is an email sent through the HackerOne portal to the user matching the substituted identifier, telling them they have been removed. The first screenshot shows this removal notification.

Step 4: Observe the in-report effect
The researcher also removed several people from a report without ever inviting them, generating removal notifications. The researcher notes that two emails were accidentally sent to two different HackerOne researchers during testing.
Root cause
The behaviour suggests the endpoint does not check that the user belongs to the report. The <user_id> in the path is trusted as an object reference and acted upon directly, so any user identifier supplied by the caller is treated as a participant of <report_id>. Because the request is otherwise valid, with a genuine admin session and a valid CSRF token, the existing defences do not interfere: the caller really is an admin, just not an admin of a relationship between that report and that user. The report does not describe the server-side code, so the exact check that is missing is inferred from behaviour rather than shown.
Impact
Two effects are described:
- A removal email is sent through the HackerOne portal to the user matching the substituted identifier, even though that user was never a participant of the report. The researcher states that such emails could be sent on a mass scale to all HackerOne users, while noting that this was not tried. The email originates from the platform and therefore looks legitimate, leaving recipients unsure why they were removed from a report they never joined.
- A malicious admin can generate notifications inside a bug report about removing participants they never added, which may confuse other admins and participants. The researcher demonstrated this by removing several people without inviting them.
The impact is bounded by the attacker holding an admin role on a program, since the request requires that session and its CSRF token.
Fix
The report does not state what was changed. A check that the <user_id> is actually a participant of <report_id> before performing the removal would address the behaviour.
Variants to test
- Swap the report identifier instead of the user identifier on the same style of endpoint, and see whether a removal or notification is produced for a report the caller does not administer. A positive result is a state change or email tied to a report outside the caller's programs.
- Apply the same substitution to the invitation side of the feature, adding a user identifier that was never selected. A positive result is an invitation or notification reaching an unrelated user.
- Try identifiers belonging to users with no relationship to the program at all. A positive result is a notification email arriving for a user who has never interacted with that program.
- Look for the same pattern in other nested resources where a parent identifier is authorised but the child identifier is taken from the path, such as members, participants, collaborators or watchers. A positive result is an action on a child object that does not belong to the parent.
Hunting notes
This kind of bug tends to hide in endpoints with two object references in the path, where the parent is checked for ownership and the child is assumed to belong to it. The signal during recon is a DELETE, PUT or POST whose URL contains both a container identifier and a member identifier, especially where the UI only ever offers members that are already attached to the container. Comparing the request the UI sends with what the server accepts, by changing only the member identifier, is enough to test it. The researcher showed impact by demonstrating a real side effect visible outside the request itself: an email delivered to an unrelated user and removals reflected in the report, which is what makes the missing check concrete rather than theoretical.
What happened, in plain words
HackerOne is a platform where companies (called programs) run bug bounty programmes: outside researchers report security problems to them, and the program's staff manage those reports. A program portal is the private web area where a program's admins do that management.
One feature of the portal lets an admin add an outside person as a participant on a bug report, so that person can see and discuss that particular report. Later, the admin can remove that person again. Removing someone is done by the browser sending a small instruction to the HackerOne server, and that instruction contains two numbers: which report, and which user.
The researcher found that the server only checked the first number. If you kept the report the same but swapped the user number for the number of somebody who had never been invited to that report, the server still carried out the removal. It sent that person an email saying they had been removed from a report they were never part of. This kind of bug is called an insecure direct object reference: the server takes an identifier straight from the request and acts on it without checking that the person making the request is allowed to touch that particular object.
The request requires an admin session on a program, so the caller can send it legitimately and then change one number in it. They demonstrated the effect with the removal email and with removals showing up inside a report. The report was disclosed on 20 February 2015 and a bounty of 500.00 USD was paid.
Background you need first
A few ideas come up again and again below, so here they are from zero.
- A request. When you click something in a browser, the browser sends a short message to a web server asking it to do something, and the server sends back a reply. That message is an HTTP request. A request has a method (a verb saying what kind of action it is), a path (which thing on the server it concerns), and headers (extra labelled details).
- Methods.
GETmeans "give me something".DELETEmeans "remove something".POSTusually means "create something" or "submit something". - An API. Think of a restaurant. The menu and the waiter are the API: a fixed list of things you can ask for, and a standard way of asking. You do not walk into the kitchen yourself. A web API is the same idea for software: a defined set of requests a program (or a browser page) can send to a server, and the server does the work behind the scenes. The portal's web pages use the HackerOne API under the hood, which is why the request below looks like a bare instruction rather than a page.
- A URL path. In
https://hackerone.com/reports/123/external_users/456, the part after the site name is the path:/reports/123/external_users/456. The numbers in it are identifiers (IDs): 123 is the report, 456 is the user. Servers often read IDs straight out of the path. - A cookie. When you log in, the server gives your browser a small piece of text called a session cookie. The browser sends it back with every later request, and that is how the server recognises you without asking for your password each time. Anyone who steals that cookie can act as you, which is why it is sensitive.
- A CSRF token. CSRF stands for cross-site request forgery: a trick where a malicious website makes your browser send a request to another site where you are logged in. To prevent it, the site puts a secret random value (the CSRF token) into its own pages, and the browser must send it back in a header with any state-changing request. A hostile site cannot read that value, so it cannot forge the request. The token is also sensitive.
- Headers. Lines such as
Host:orUser-Agent:in a request.User-Agentsays which browser and system you use;Referersays which page you came from;Accept-LanguageandAccept-Encodingsay which languages and compression formats you accept;X-Requested-With: XMLHttpRequestis a convention meaning "this request came from a page's own script, not from typing a URL". - An identifier, and object references. An ID is just a label for a thing stored on the server: a report, a user, a message. When a request names a thing by its ID, that ID is an object reference. A direct object reference means the ID is right there in the request, visible and editable.
- Insecure Direct Object Reference (IDOR). The bug class in this report. The server receives an ID from the user and acts on the object it names without checking that this user is allowed to act on that object. A comparison: a hotel clerk who hands out a room key to anyone who says a room number, without checking that the person actually booked that room. The number is real, the key works, but the check that should link person to room is missing.
- Authorisation versus authentication. Authentication is proving who you are (logging in). Authorisation is deciding what you are allowed to do once you are known. This bug is an authorisation failure: the caller really is a logged-in admin, just not an admin with any relationship to the user being removed.
- The feature. On a bug report, a program admin can add external people as participants, and later remove them. The removal is the operation that turned out to be broken.
The starting point: the normal removal request
To study a feature, you first look at what the browser normally sends when you use it. As an admin, the researcher removed an external participant from a report and captured the request that the portal sent. It looks like this:
DELETE /reports/<report_id>/external_users/<user_id> HTTP/1.1
Host: hackerone.com
User-Agent: <redacted>
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
X-CSRF-Token: <redacted>
X-Requested-With: XMLHttpRequest
Referer: <redacted>
Cookie: <redacted>
Connection: keep-alive
Line by line, in plain words:
DELETE /reports/<report_id>/external_users/<user_id> HTTP/1.1is the request line. The verb isDELETE, so this is a removal. The path says: underreports, take the report whose ID is<report_id>, then underexternal_users, take the user whose ID is<user_id>.HTTP/1.1is the version of the request format. The angle brackets are placeholders: in a real request they are actual numbers.Host: hackerone.comtells the server which site the request is for. One server can host many sites, so it needs to know which one you mean.User-Agent: <redacted>identifies the browser. It is blanked out here because it can reveal details about the researcher's machine.Accept-Language: en-US,en;q=0.5says the browser prefers US English, with a lower preference for generic English.Accept-Encoding: gzip, deflatesays the browser can accept compressed replies, which saves bandwidth.X-CSRF-Token: <redacted>is the anti-forgery secret described above. It is redacted because it is a secret tied to the session.X-Requested-With: XMLHttpRequestmarks the request as coming from the page's own script rather than a typed address.Referer: <redacted>would normally say which page the request came from; it is blanked out here.Cookie: <redacted>carries the session cookie that identifies the logged-in admin. Redacted because anyone holding it could act as that admin.Connection: keep-aliveasks the server to keep the network connection open for further requests, which is a small speed optimisation.
The important part is the path. It contains two object references: <report_id> for the report and <user_id> for the participant being removed. The researcher's question was simple: what happens if I change the second one?
Finding the flaw
The researcher changed the value of <user_id> in the path and sent the request again, keeping the same report and the same session. The server accepted it and produced a delete notification for the user matching the new ID, even though that user had never been invited as a participant on that bug report.
Put differently: the report ID stayed the same, and the user ID was swapped for one with no relationship to that report, and the server still acted. The server was treating whatever user ID arrived as if it were a participant of the report named in the same path. Nothing in the request was forged: the session was genuine, the CSRF token was genuine, the caller really was an admin. The only thing wrong was the relationship between the two IDs, and nobody checked it.
Step by step, as the researcher did it
- Capture the legitimate removal request. As an admin, remove an external participant from a report and capture the request the portal sends. It is the
DELETEshown above, with the report ID and the invited user's ID in the path. You capture it because you need a known-good example: a request the server is definitely supposed to accept. Everything after that is a controlled change to that example. - Swap the user identifier. Change
<user_id>in the path to the ID of a user who was never invited to that report, and send the request with the same session and CSRF token. The server processes the deletion for that user ID. The reason for changing only one thing at a time is that it isolates the cause: if the result changes, you know the swapped ID is what caused it, not some other difference. - Observe the notification. The visible consequence is an email sent through the HackerOne portal to the user matching the substituted ID, telling them they have been removed. The screenshot in the report shows this removal notification.

- Observe the effect inside the report. The researcher also removed several people from a report without ever inviting them, generating removal notifications. The researcher notes that two emails were accidentally sent to two different HackerOne researchers during testing, and apologises for them.
Why it worked
The behaviour suggests the endpoint does not check that the user belongs to the report. The <user_id> in the path is trusted as an object reference and acted upon directly, so any user ID supplied by the caller is treated as a participant of <report_id>. Because the request is otherwise valid, with a genuine admin session and a valid CSRF token, the existing defences do not interfere: the caller really is an admin, just not an admin of a relationship between that report and that user. The report does not show the server-side code, so the exact missing check is inferred from behaviour rather than read from source.
What an attacker could do with it
The report describes two effects.
- A removal email is sent through the HackerOne portal to the user matching the substituted ID, even though that user was never a participant of the report. The researcher states that such emails could be sent on a mass scale to all HackerOne users, while noting that this was not tried. The email comes from the platform itself, so it looks legitimate, and recipients are left unsure why they were removed from a report they never joined. The everyday comparison: a company letterhead makes a letter look official even when the content is nonsense, and the recipient has no easy way to tell.
- A malicious admin can generate notifications inside a bug report about removing participants they never added, which may confuse other admins and participants. The researcher demonstrated this by removing several people without inviting them.
The impact is limited by the attacker needing an admin role on a program, because the request requires that session and its CSRF token.
The fix
The report does not state what was changed. A check that the <user_id> is actually a participant of <report_id> before performing the removal would address the behaviour. In the hotel comparison: the clerk looks up the booking and only hands over the key if the name matches.
Variants worth testing
Once you know the shape of a bug, you look for the same shape elsewhere. These are variations worth testing, each with what a positive result would look like.
- Swap the report identifier instead of the user identifier on the same style of endpoint, and see whether a removal or notification is produced for a report the caller does not administer. A positive result is a state change or email tied to a report outside the caller's programs.
- Apply the same substitution to the invitation side of the feature, adding a user identifier that was never selected. A positive result is an invitation or notification reaching an unrelated user.
- Try identifiers belonging to users with no relationship to the program at all. A positive result is a notification email arriving for a user who has never interacted with that program.
- Look for the same pattern in other nested resources where a parent identifier is authorised but the child identifier is taken from the path, such as members, participants, collaborators or watchers. A positive result is an action on a child object that does not belong to the parent.
How to spot this kind of bug yourself
This kind of bug tends to hide in endpoints with two object references in the path, where the parent is checked for ownership and the child is assumed to belong to it. The signal during recon (the early stage of exploring a target) is a DELETE, PUT or POST whose URL contains both a container identifier and a member identifier, especially where the interface only ever offers members that are already attached to the container. Comparing the request the interface sends with what the server accepts, by changing only the member identifier, is enough to test it. The researcher showed impact by demonstrating a real side effect visible outside the request itself: an email delivered to an unrelated user and removals reflected in the report, which is what makes the missing check concrete rather than theoretical.
Glossary
- API: a defined set of requests that software can send to a server, like a menu and waiter in a restaurant; you ask in a standard way and the server does the work.
- Authentication: proving who you are, usually by logging in.
- Authorisation: deciding what a known user is allowed to do.
- Bug bounty programme: a scheme where a company pays outside researchers for reporting security problems.
- Cookie: a small piece of text a site stores in your browser; the session cookie identifies your logged-in session.
- CSRF (cross-site request forgery): a trick where a malicious site makes your browser send a request to a site where you are logged in.
- CSRF token: a secret random value the site puts in its pages and expects back in a header, so a hostile site cannot forge requests.
- DELETE: an HTTP method meaning "remove this thing".
- Endpoint: a specific address and method on a server that performs a specific action.
- Header: a labelled extra detail in an HTTP request or reply, such as
HostorUser-Agent. - HTTP: the language browsers and web servers use to exchange requests and replies.
- IDOR (Insecure Direct Object Reference): a bug where the server takes an ID from the request and acts on the object it names without checking the caller is allowed to touch that object.
- Identifier (ID): a label, usually a number, that names a stored thing such as a report or a user.
- Method: the verb of an HTTP request, such as
GET,POST,PUTorDELETE. - Object reference: an ID in a request that points at a stored thing on the server.
- Path: the part of a URL after the site name, such as
/reports/123/external_users/456. - POST: an HTTP method usually meaning "create" or "submit".
- Program portal: the private web area where a company's staff manage their bug bounty reports.
- PUT: an HTTP method usually meaning "replace or update this thing".
- Recon: the early exploration of a target to find what it offers and where to look for weaknesses.
- Redacted: blanked out on purpose, usually to hide secrets or personal data.
- Request: a message a browser sends to a server asking it to do something.
- Session: the server's memory of you being logged in, kept going by the session cookie.
- User-Agent: a header saying which browser and system you use.
- X-Requested-With: a header convention meaning the request came from a page's own script rather than a typed address.