Skip to content
IDOR Write-up Beginner

An IDOR lead joins any group makes me $2,500

The group invitation acceptance endpoint used a sequential numeric identifier (c2mId) without checking that the current user was actually invited to that group. An attacker could change the identifier to join any private group and then post comments or create topics there.

Arman Follow

Published on infosecwriteups.com

Bounty$2,500 View original

This website has a feature to create a private group, and group management can allow other users to access them by sending invitations, normally the information of private groups is confidential and inaccessible. When you are invited to a private group, in a part of the site you can see your invitations and accept or…

M7arm4n, on infosecwriteups.com

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

The target is a website with a private group feature. Groups can be created as private, and the information inside a private group is meant to be confidential and inaccessible to anyone who has not been invited. Group managers bring other users in by sending invitations. An invited user sees their invitations somewhere on the site and can accept or reject them.

The report describes an IDOR (Insecure Direct Object Reference) in the invitation acceptance flow. IDOR, as the author puts it, is a vulnerability where an application lets an attacker access or manipulate resources directly by modifying input parameters, such as URLs, without proper authorisation. It typically arises when an application relies on user-supplied input to decide which object to retrieve but does not validate or authorise the user's access to that object, for example by exposing internal identifiers such as database record IDs in URLs or parameters.

Setup

The researcher used three accounts:

Role Purpose
Manager Creates the private groups and sends the invitations
Attacker Accepts an invitation and tampers with the request
User A second invitee, used to populate the second group

The tooling was Burp Suite: the acceptance request is captured and sent to Repeater, where the parameter is modified. The browser in the captured request is Firefox 111 on macOS (Intel Mac OS X 10.15), but nothing in the finding depends on that.

Finding it

When an invited user clicks Accept, the site sends a POST request to /GroupInvitations. The request carries a c2mId parameter, which is a code identifying the invited group. That value is the object reference the server trusts to decide which group the acceptance applies to. Because it is a number supplied by the client, changing it up or down let the attacker reach a group they were never invited to. That is the IDOR.

Exploitation

The researcher's reproduction steps are:

  1. Create 3 accounts: Manager, Attacker, user.
  2. Create 2 groups with the Manager account.
  3. Invite the Attacker user to group A.
  4. From attacker accepts the invitation and sends the request to the repeater.
  5. Back to the manager Account and invite the user to group B.
  6. Back to the repeater and add one digit to c2mId.
  7. Go to the attacker account and see group B.

Step 1: capture the acceptance request

The Manager creates two private groups, referred to in the report as Group-AAAA and Group-BBBB. Both are private, so users who are not members cannot leave comments, create topics and so on. The Manager invites the Attacker to Group-AAAA. The Attacker accepts, and the resulting request is saved to Burp Repeater:

HTTP
POST /GroupInvitations HTTP/1.1Host: redacted.comUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/111.0Accept: */*Accept-Language: en-US,en;q=0.5Accept-Encoding: gzip, deflateReferer: https://redacted.com/GroupActivityContent-Type: application/x-www-form-urlencodedX-Xsrf-Token: 6c2be6f7-3880-4652-951b-9ef779f201d6Content-Length: 37Origin: https://redacted.comSec-Fetch-Dest: emptySec-Fetch-Mode: corsSec-Fetch-Site: same-originTe: trailersConnection: closeGroupInvitations&action=A&c2mId=7069

The body is form-encoded and contains three parts: GroupInvitations, action=A (accept) and c2mId=7069, the identifier of the group being accepted. The request also carries an X-Xsrf-Token header and a Referer pointing at /GroupActivity, so the acceptance is a normal authenticated, CSRF-protected action. The only thing that ties it to a specific invitation is the client-supplied c2mId.

Step 2: create a second, unrelated group

The Manager goes back and invites the second account (the user) to Group-BBBB. The Attacker was never invited to Group-BBBB and has no relationship with it.

Step 3: change the identifier

Back in Repeater, the Attacker adds one digit to c2mId and sends the request again. The report does not show the modified request body, only that a single digit was added to the value.

Step 4: observe the result

The Attacker refreshes the group page. The Attacker now has access to Group-BBBB and can leave comments, create topics and so on, exactly as a legitimate member could.

From the original on infosecwriteups.com

One further property matters: the value of c2mId is not single-use. Even if a normal user accepts the invitation, the attacker can use the same value again to access the groups. The report notes the value can be used again even after a normal user accepts the invitation.

Root cause

Changing c2mId to a neighbouring value gave the attacker access to a group they were not invited to. Authorisation is effectively delegated to the client: whoever sends the request decides which group the acceptance applies to. The presence of a valid session and a valid X-Xsrf-Token proves the request came from the logged-in user, but neither of those binds the request to a specific invitation, so a valid CSRF token does not help here. The identifier is also not single-use, so a value learned once can be replayed against the same group later.

Impact

An attacker with an account and one legitimate invitation could join another private group by changing the numeric identifier. Once inside, they can leave comments, create topics and so on. The report does not describe any further actions beyond that, and does not state how the identifiers are allocated beyond the observation that adding one digit reached the neighbouring group. The bounty for the report was $2,500.

Fix

The change the finding calls for is server-side: on acceptance, look up the invitation belonging to the authenticated user and derive the group from that record rather than trusting c2mId, and reject the request when no such invitation exists. Invitations should also be single-use, so an accepted or already-used reference cannot be replayed.

Variants to test

  • Other invitation actions. The same body carries action=A for accept. Try action=R (reject) or other values with a tampered c2mId and see whether the response confirms an action on a group you were not invited to.
  • Other group-scoped endpoints. Any request that takes a group identifier from the client (posting a topic, commenting, fetching group details) is worth replaying with a neighbouring identifier. A positive result is content from a group you are not a member of appearing in the response.
  • Identifier enumeration. If adding one digit reaches a neighbouring group, walk the range systematically and record which identifiers return group data. A positive result is a stable mapping from identifier to group you have no membership in.
  • Replay after acceptance. Accept a legitimate invitation, then resend the same request later. A positive result is the request succeeding again, showing the reference is not single-use.
  • Invitation identifiers versus group identifiers. Check whether the invitation itself has an ID separate from the group ID, and whether swapping one for the other changes which group you land in.

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. 14 min read.

What happened, in plain words

A website let people create private groups. A private group is like a members-only club room: only people the manager has invited can get in, read what is posted there, write comments or start new topics. The manager brings people in by sending them an invitation, and the invited person sees a list of invitations somewhere on the site with Accept and Reject buttons.

The researcher found that when you click Accept, your browser sends a small message to the website's server. That message contains a number that says which group you are accepting an invitation for. The server acted on the number the browser sent. Changing it to a neighbouring group's number let the researcher into a group nobody had invited them to. The researcher used this to join a private group they were never invited to, and got paid $2,500 for reporting it.

This kind of mistake has a name: IDOR, short for Insecure Direct Object Reference. The rest of this article explains what that means, walks through the exact request that was sent, and shows how the researcher changed one number to get in.

What IDOR means

The report starts by explaining the vulnerability class itself. An IDOR happens when a website lets you reach something by simply naming it in a request, without checking whether you are allowed to have it. The name comes from two ideas:

  • Direct object reference: the website uses a simple label, such as a number, to point at a thing stored on its side (a group, a file, a database record).
  • Insecure: the website trusts the label you send instead of checking your permissions.

A useful everyday comparison is a hotel. Imagine the reception desk hands you a key card for room 412. If the door lock only checks that the card is a valid hotel card, and not that it belongs to room 412, then any guest can open any room by trying the doors. The room number is the "direct object reference"; the missing check is the "insecure" part.

In web terms, the report says IDORs typically appear when an application relies on input supplied by the user to decide which object to fetch, but does not properly validate or authorise the user's access to that object. A common example is a website that puts internal identifiers, such as database record IDs, into URLs or request parameters without checking whether the current user has permission to access those resources.

Two words in that explanation are worth unpacking for a beginner:

  • Parameter: a named value sent along with a request, like c2mId=7069. Think of it as a form field that the browser fills in and the server reads.
  • Authorisation: the check of whether a logged-in user is allowed to do a particular thing. Logging in proves who you are (authentication); authorisation is the separate question of what you may touch.

The feature being attacked

The target is a website with a private group feature. Groups can be created as private, and the information inside a private group is meant to be confidential and inaccessible to anyone who has not been invited. Group managers bring other users in by sending invitations. An invited user sees their invitations somewhere on the site and can accept or reject them.

The report describes an IDOR in the invitation acceptance flow. In other words, the bug is not in creating groups or in the invitation list; it is in the moment the invited person clicks Accept and the browser tells the server "yes, I accept".

Setting up the test

The researcher used three accounts, each with a clear job:

Role Purpose
Manager Creates the private groups and sends the invitations
Attacker Accepts an invitation and tampers with the request
User A second invitee, used to populate the second group

Why three? Because the test needs a group the attacker is legitimately in (to capture a real acceptance request) and a second group the attacker is not in (to try to break into). The third account exists so that the second group has a genuine invitation in play, which makes the scenario realistic.

The tooling was Burp Suite. Burp Suite is a program that sits between your browser and the website and lets you look at, pause and edit the requests your browser sends. The specific part used here is Repeater, a screen where you can take a captured request, change something in it, and send it again as many times as you like. The browser in the captured request is Firefox 111 on macOS (Intel Mac OS X 10.15), but nothing in the finding depends on that.

Finding it

When an invited user clicks Accept, the site sends a POST request to /GroupInvitations. A POST request is one of the standard ways a browser talks to a server: it is used when the browser is sending data, as opposed to just asking for a page. The request carries a c2mId parameter, which is a code identifying the invited group. That value is the object reference the server trusts to decide which group the acceptance applies to. Because it is a number supplied by the client, changing it up or down let the attacker reach a group they were never invited to. That is the IDOR.

Exploitation

The researcher's reproduction steps are:

  1. Create 3 accounts: Manager, Attacker, user.
  2. Create 2 groups with the Manager account.
  3. Invite the Attacker user to group A.
  4. From attacker accepts the invitation and sends the request to the repeater.
  5. Back to the manager Account and invite the user to group B.
  6. Back to the repeater and add one digit to c2mId.
  7. Go to the attacker account and see group B.

Each step has a reason:

  1. Three accounts give you three separate identities, so you can act as the manager, the attacker and an innocent third party without logging in and out of the same account.
  2. Two groups give you one group the attacker is allowed into and one they are not.
  3. The first invitation is the legitimate one. It produces a real acceptance request that the attacker is entitled to send.
  4. Capturing that request in Repeater is the key move: it gives you a working request you can edit and resend.
  5. The second invitation puts a real invitation for group B into the system, so the server has something to compare against.
  6. Changing one digit in c2mId is the actual attack: you are asking the server to apply the acceptance to a different group.
  7. Refreshing the group page shows whether the server believed you.

Step 1: capture the acceptance request

The Manager creates two private groups, referred to in the report as Group-AAAA and Group-BBBB. Both are private, so users who are not members cannot leave comments, create topics and so on. The Manager invites the Attacker to Group-AAAA. The Attacker accepts, and the resulting request is saved to Burp Repeater:

HTTP
POST /GroupInvitations HTTP/1.1Host: redacted.comUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/111.0Accept: */*Accept-Language: en-US,en;q=0.5Accept-Encoding: gzip, deflateReferer: https://redacted.com/GroupActivityContent-Type: application/x-www-form-urlencodedX-Xsrf-Token: 6c2be6f7-3880-4652-951b-9ef779f201d6Content-Length: 37Origin: https://redacted.comSec-Fetch-Dest: emptySec-Fetch-Mode: corsSec-Fetch-Site: same-originTe: trailersConnection: closeGroupInvitations&action=A&c2mId=7069

This is an HTTP request, the standard message a browser sends to a web server. It is shown here as one long line because that is how it appears in the report. Read it piece by piece:

  • POST /GroupInvitations HTTP/1.1: the method is POST (sending data), the path is /GroupInvitations (the part of the site that handles invitations), and HTTP/1.1 is the version of the protocol.
  • Host: redacted.com: which website the request is for. The real domain has been replaced with redacted.com.
  • User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/111.0: the browser identifying itself. This is just the browser that happened to be used.
  • Accept: */*, Accept-Language: en-US,en;q=0.5, Accept-Encoding: gzip, deflate: the browser saying what kinds of response and languages it can handle.
  • Referer: https://redacted.com/GroupActivity: the page the browser was on when it sent the request. Here it is the group activity page.
  • Content-Type: application/x-www-form-urlencoded: the format of the data in the body. It means the values are written as name=value pairs joined by &, the same format a simple HTML form uses.
  • X-Xsrf-Token: 6c2be6f7-3880-4652-951b-9ef779f201d6: a CSRF token. CSRF stands for Cross-Site Request Forgery, an attack where another website tricks your browser into sending a request you did not intend. To stop that, the site gives your browser a random value and expects it back on sensitive requests. A token is like a one-time ticket that proves the request came from the site's own pages and not from somewhere else. The value here is a secret and has been replaced with [redacted] in this article.
  • Content-Length: 37: the size of the body in bytes.
  • Origin: https://redacted.com: which site the request came from.
  • Sec-Fetch-Dest, Sec-Fetch-Mode, Sec-Fetch-Site, Te, Connection: browser and connection housekeeping headers. They are not part of the bug.
  • The last line is the body: GroupInvitations&action=A&c2mId=7069.

The body is form-encoded and contains three parts: GroupInvitations, action=A (accept) and c2mId=7069, the identifier of the group being accepted. The request also carries an X-Xsrf-Token header and a Referer pointing at /GroupActivity, so the acceptance is a normal authenticated, CSRF-protected action. The only thing that ties it to a specific invitation is the client-supplied c2mId.

That last sentence is the heart of the bug. The session (your logged-in state) and the CSRF token prove that you are a real logged-in user sending a real request. Neither of them says which invitation the request is for. The only thing that says "this is for group 7069" is the number the browser itself put in the body, and the browser is under the attacker's control.

Step 2: create a second, unrelated group

The Manager goes back and invites the second account (the user) to Group-BBBB. The Attacker was never invited to Group-BBBB and has no relationship with it. This step matters because it creates a situation where group B exists and has a real invitation attached to it, but that invitation belongs to somebody else.

Step 3: change the identifier

Back in Repeater, the Attacker adds one digit to c2mId and sends the request again. The report does not show the modified request body, only that a single digit was added to the value. The idea is simple: if group A is 7069, then a nearby number such as 7070 or 70690 is likely to be another group. Adding a digit is a quick way to test whether the server cares whose invitation you are accepting.

Step 4: observe the result

The Attacker refreshes the group page. The Attacker now has access to Group-BBBB and can leave comments, create topics and so on, exactly as a legitimate member could.

From the original on infosecwriteups.com

One further property matters: the value of c2mId is not single-use. Even if a normal user accepts the invitation, the attacker can use the same value again to access the groups. The report notes the value can be used again even after a normal user accepts the invitation. A comparison: a cinema ticket that is torn on entry can only be used once, but this number behaves like a door code that keeps working every time you type it in.

Root cause

Changing c2mId to a neighbouring value gave the attacker access to a group they were not invited to. Authorisation is effectively delegated to the client: whoever sends the request decides which group the acceptance applies to. The presence of a valid session and a valid X-Xsrf-Token proves the request came from the logged-in user, but neither of those binds the request to a specific invitation, so a valid CSRF token does not help here. The identifier is also not single-use, so a value learned once can be replayed against the same group later.

In plain terms: the site checked "is this a real logged-in user?" but forgot to check "does this user have an invitation for this particular group?". The second check is the one that matters for privacy.

Impact

An attacker with an account and one legitimate invitation could join another private group by changing the numeric identifier. Once inside, they can leave comments, create topics and so on. The report does not describe any further actions beyond that, and does not state how the identifiers are allocated beyond the observation that adding one digit reached the neighbouring group. The bounty for the report was $2,500.

Why is this serious? Private groups are sold to users as private. If a member of one group can walk into another group by changing a number, the privacy promise is broken. The attacker needed only an account and a legitimate invitation, plus a tool to edit the request.

Fix

The change the finding calls for is server-side: on acceptance, look up the invitation belonging to the authenticated user and derive the group from that record rather than trusting c2mId, and reject the request when no such invitation exists. Invitations should also be single-use, so an accepted or already-used reference cannot be replayed.

In everyday terms: instead of asking the visitor "which room are you entering?" and opening that door, the receptionist should look up the visitor's name on the guest list and open the room that the list says they were given.

Variants to test

Once you understand the pattern, the same idea can be tried in a few nearby places. These are suggestions for further testing, not things the report says were tested:

  • Other invitation actions. The same body carries action=A for accept. Try action=R (reject) or other values with a tampered c2mId and see whether the response confirms an action on a group you were not invited to.
  • Other group-scoped endpoints. Any request that takes a group identifier from the client (posting a topic, commenting, fetching group details) is worth replaying with a neighbouring identifier. A positive result is content from a group you are not a member of appearing in the response.
  • Identifier enumeration. If adding one digit reaches a neighbouring group, walk the range systematically and record which identifiers return group data. A positive result is a stable mapping from identifier to group you have no membership in.
  • Replay after acceptance. Accept a legitimate invitation, then resend the same request later. A positive result is the request succeeding again, showing the reference is not single-use.
  • Invitation identifiers versus group identifiers. Check whether the invitation itself has an ID separate from the group ID, and whether swapping one for the other changes which group you land in.

Glossary

  • API: a way for one piece of software to talk to another, usually by sending requests to specific addresses and getting structured answers back. Here, the site's own pages talk to its server through requests like the one captured.
  • Authentication: proving who you are, usually by logging in. It answers "who is this?".
  • Authorisation: checking what a logged-in user is allowed to do or see. It answers "may this person touch this thing?".
  • Body: the part of an HTTP request that carries data, as opposed to the headers that describe the request.
  • Burp Suite: a tool that sits between your browser and a website so you can inspect, pause and edit requests.
  • Burp Repeater: the part of Burp Suite where you can take a captured request, change it and send it again repeatedly.
  • Cookie: a small piece of data a website stores in your browser so it can recognise you on later requests, for example to keep you logged in.
  • CSRF (Cross-Site Request Forgery): an attack where another website tricks your browser into sending a request you did not intend. Sites defend against it with a CSRF token.
  • CSRF token: a random value the site gives your browser and expects back on sensitive requests, proving the request came from the site's own pages. Also called an XSRF token.
  • Endpoint: a specific address on a website that handles a particular action, such as /GroupInvitations.
  • Enumeration: trying a series of values (for example, numbers in a range) one after another to discover which ones exist or work.
  • Form-encoded: a data format where values are written as name=value pairs joined by &, the same format a simple HTML form uses.
  • Header: a line in an HTTP request or response that carries information about the request, such as the browser type or a token.
  • HTTP: the protocol browsers and web servers use to exchange requests and responses.
  • IDOR (Insecure Direct Object Reference): a vulnerability where a website lets you reach an object by naming it in a request without checking that you are allowed to have it.
  • Identifier (ID): a label, often a number, that a website uses internally to point at a specific thing such as a group or a record.
  • Parameter: a named value sent with a request, such as c2mId=7069.
  • POST: an HTTP method used when the browser is sending data to the server, as opposed to just asking for a page.
  • Private group: a group on the site that only invited members can see and interact with.
  • Referer: a header telling the server which page the browser was on when it sent the request.
  • Replay: sending the same request again later, to see whether the server still accepts it.
  • Request: the message a browser sends to a server asking it to do something or return something.
  • Response: the message a server sends back after a request.
  • Session: the server's memory of your logged-in state across multiple requests, usually tied to a cookie.
  • Single-use: a value that stops working after it has been used once, like a torn cinema ticket.
  • User-Agent: a header in which the browser identifies itself and its version.
  • Vulnerability: a weakness in software that can be used to do something the owner did not intend.
  • X-Xsrf-Token: the header name this site uses to carry its CSRF token.

More by Arman

View all

8 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.