How I Found an IDOR Bug That Exposed Other Users’ Account Infor
An API endpoint returned account information for any user ID supplied by the client without checking whether the requester was authorised to access that object. An attacker could change the numeric user identifier to retrieve other users' email addresses and account metadata.
Published on bugbountywizard.app
Idor Vulnerability
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
The researcher tested an application with a user-profile feature backed by an API. The researcher does not name the application or the program in the article; the only concrete artefact is the endpoint path. The feature normally returns account information associated with a user ID, and the application sends that numeric identifier directly in the URL path:
GET /api/user_info/{user_id}
That is the whole of the feature as described: a profile lookup keyed by a numeric user identifier, returning account-related fields for that user.
Setup
The researcher created his own account and navigated through the profile functionality of the application. Testing was done inside an authorised bug-bounty scope, and the article carries an explicit disclaimer that the target, identifiers and sensitive user information are intentionally limited or anonymised, and that no one should test systems or access other users' information without permission.
The tooling was Burp Suite, used to watch the requests the application generated while browsing the profile feature. No versions, headers, cookies or account roles beyond the researcher's own account are given.
Finding it
While reviewing the captured traffic, one request stood out because it carried a numeric identifier straight in the URL:
GET /api/user_info/{user_id}
The researcher captured the request for his own account and inspected the response. The server returned account-related information associated with his user ID, which looked entirely normal. The question he asked at that point was not whether another user's ID could be guessed, but whether the server verifies that the requester is allowed to access the object identified by the ID. Those are different questions: guessing an identifier is a discovery problem, while missing authorisation is an access-control problem.
Exploitation
Step 1: Capture the legitimate request
With Burp Suite intercepting, the researcher captured the profile request generated for his own authenticated account and inspected the response. The server returned the account information tied to his own user ID. Nothing unusual at this stage.
Step 2: Change the identifier
Still within the bug-bounty scope, he substituted the user identifier with another test value. The request still returned:
HTTP/2 200 OK
A successful status alone was enough to warrant a closer look, but the decisive evidence was in the body.
Step 3: Inspect the response
He inspected the returned object and found it was associated with a different account. The server had accepted the client-supplied identifier and returned data for that object without an appropriate check that the requester was entitled to it. That was the confirmation of an IDOR / Broken Object Level Authorization (BOLA) issue.
The researcher describes the behaviour conceptually as the application doing this:
Client → "Give me user 182775"
Server → "Sure, here is the data."
When it should have been asking:
Who is making this request?
Which user are they allowed to access?Does that permission match the requested object?If not → deny the request.
Step 4: Establish scope with a small number of requests
After confirming the boundary could be crossed, he wanted to know whether this was an isolated mistake or a broader problem. He deliberately did not collect a database of users. A small number of controlled requests were enough to show that the server returned information for accounts other than his own, and that was already sufficient evidence for a report. The finding he reported is the authorisation failure itself, not the number of records that could be retrieved.
Step 5: Note the CORS configuration
While reviewing the response, he noticed permissive CORS headers, including:
Access-Control-Allow-Origin: *
along with broad allowed headers and methods. He is explicit that CORS by itself does not automatically create an account-data leak, and that the real vulnerability was the missing object-level authorisation. He included the CORS configuration as a supporting observation rather than claiming it was the root cause, noting that overly permissive CORS can increase exposure depending on the authentication model, browser behaviour, and whether credentials or other sensitive mechanisms are involved.
Root cause
From an external testing perspective, the likely root cause was an insufficient server-side authorisation check. The API appeared to trust the requested object identifier instead of enforcing an authorisation relationship between the authenticated user and the requested object:
Authenticated User ↓Requested Object ↓Authorization Check
The correct implementation should verify authorisation on the server for every request. Hiding IDs, using numeric IDs, or relying on the frontend is not an access-control mechanism. Authentication itself worked: the researcher was logged in normally, and the request was made as himself. Authorisation failed, because the server did not check that the object he asked for belonged to him.
The numeric identifiers add a second dimension. Because the API uses predictable numeric user IDs, an attacker who can repeatedly request different identifiers and receive valid responses may be able to enumerate accounts at scale. That turns the question from whether one user's information can be accessed into whether the authorisation failure can be repeated across the application's user base, which is a much larger privacy concern.
Impact
The response contained more than a public profile identifier. Depending on the account, the API returned account metadata such as:
- Email address
- Account/member type
- Email verification status
- Phone verification status
- Password-related account state
- Application/verification status
- Timezone
- Language
- Currency
- Local-time information
Any one of these fields might look harmless on its own, but returned together for another account the privacy impact is significant. The researcher's biggest concern was the exposure of email addresses. Combined with predictable numeric identifiers, the flaw could potentially affect many users, which is why he rated it High, while noting that the exact severity should depend on the program's rules, the authentication requirements, the sensitivity of the exposed fields, and the demonstrated impact.
Fix
The fix is not simply changing numeric IDs to random IDs. The application should implement proper server-side authorisation on every request:
Request arrives ↓Authenticate requester ↓Identify requested object ↓Check ownership/permission ↓Authorized? ↙ ↘ YES NO ↓ ↓Return data 403/404
Additional defensive measures he lists:
- Enforce object-level authorisation on every API request.
- Avoid returning unnecessary sensitive fields.
- Apply least-privilege principles.
- Use appropriate access-control policies.
- Add automated authorisation tests.
- Monitor abnormal object-ID access patterns.
- Rate-limit sensitive endpoints where appropriate.
- Review CORS configuration according to the application's authentication model.
- Avoid relying on frontend restrictions for security.
The article does not say whether any of these were applied by the program.
Variants to test
- IDs in URL paths. Send a request for your own object, then swap the path identifier for another test value. A positive result is a 200 response whose body contains fields belonging to the other account.
- IDs in query parameters and JSON bodies. The same substitution in
?id=style parameters or in request bodies. A positive result is data for an object you do not own coming back in the response. - Other object types. Document or file identifiers, order IDs, message IDs and organisation IDs. A positive result is any of these objects being returned to an account that should not see them.
- Numeric versus opaque identifiers. Predictable numeric IDs make enumeration practical; try sequential values within scope and watch for valid responses. A positive result would be successful responses for identifiers that are not yours.
- Permissive CORS on the same endpoint. Check for
Access-Control-Allow-Origin: *together with broad allowed headers and methods, and consider whether the authentication model makes that meaningful. A positive result would be a cross-origin readable response carrying account data, but only where credentials or other sensitive mechanisms are actually involved. - Authorisation versus authentication. Confirm that a fully authenticated session with no special role can still reach another user's object. A positive result is a normal authenticated user crossing the boundary, which shows the check is missing rather than merely misconfigured for one role.
What happened, in plain words
A security researcher was testing a website as part of a bug-bounty programme. A bug-bounty programme is an arrangement where a company invites outside people to look for security problems in its systems and report them, usually with a reward, instead of being attacked by surprise. While testing, he found that one simple request to the website's programming interface returned account information belonging to a different account, not just his own. He only had to change one number in the request to do it.
The kind of mistake he found is called an IDOR, short for Insecure Direct Object Reference, and also BOLA, short for Broken Object Level Authorization. Both names describe the same idea: the website hands out information about a thing (an "object") to anyone who asks for it by its identifier, without checking whether the person asking is allowed to see that particular thing. Think of a hotel where the receptionist gives out room keys to anyone who reads out a room number, without checking that the person is the guest staying there.
The researcher did not name the application or the programme in his article. He also deliberately kept the target, the identifiers and the personal information limited or anonymised, and he added a disclaimer that nobody should test systems or access other people's information without permission. Everything below follows his account.
The feature he was looking at
The application had a user-profile feature. A profile is the page or data record that holds information about one account: things like an email address, preferences and account status. Behind that page sat an API.
An API, short for Application Programming Interface, is the part of a website that the page talks to in order to fetch or send data. A useful comparison is a restaurant: the page you see is the dining room, the API is the kitchen door where orders go in and plates come out, and you never walk into the kitchen yourself. When you click around a website, your browser quietly sends many small requests to that kitchen door, and each one asks for a specific piece of data.
The profile feature worked like this: the application sent a numeric identifier, meaning a plain number that stands for one user, directly in the address of the request. The address looked like this:
GET /api/user_info/{user_id}
Line by line, in plain words:
GETis the type of request. It means "please give me something", as opposed to sending something to the server. It is the same word your browser uses every time you open a normal web page./api/user_info/is the path, the part of the address that says which feature on the server you are talking to. Here it is the user-information feature.{user_id}is a placeholder. In a real request it is replaced by an actual number, the identifier of one particular user. The curly brackets are not sent; they just show where the number goes.
So the whole line means: "give me the account information for the user whose number appears at the end of this address". That is the entire feature as described: a profile lookup keyed by a numeric user identifier, returning account-related fields for that user.
How he set up the test
He started by creating his own account on the application and clicking through the profile functionality like a normal user would. This matters because he needed a legitimate, logged-in session of his own to compare against. A session is simply the state of being logged in: the server remembers who you are between requests, usually by giving your browser a small piece of data called a cookie or a token, which your browser sends back with every request. A cookie is a small file a website stores in your browser; a token is a similar short string of characters used to prove who you are. Either way, it is like a wristband at an event: you show it at the door and you are let in without proving your identity again.
To watch the requests, he used a tool called Burp Suite. Burp Suite is a program that sits between your browser and the website and lets you see, pause and edit every request and response. A comparison: it is like a post office clerk who opens every letter you send and every letter you receive, reads them, and can even rewrite them before they go out. Security testers use it because a normal browser hides all this traffic from you.
No versions, headers, cookies or account roles beyond his own account are given in the article.
Finding it
While reviewing the captured traffic, one request stood out because it carried a numeric identifier straight in the URL. A URL is the address of a web page or request, the thing you see in your browser's address bar. Seeing a raw number in an address is interesting to a tester because numbers are easy to change, and if the server does not check who is asking, changing the number may change whose data comes back.
He captured the request for his own account and inspected the response. The response is the server's reply: the status line plus the data it sends back. The server returned account-related information associated with his user ID, which looked entirely normal.
The question he asked at that point is the heart of the whole article. He did not ask whether another user's ID could be guessed. He asked whether the server verifies that the requester is allowed to access the object identified by the ID. Those are different questions. Guessing an identifier is a discovery problem: can I work out someone else's number? Missing authorisation is an access-control problem: even if I know the number, am I allowed to use it? A comparison: knowing a stranger's house number is not a crime, but the door should still be locked.
Exploitation
Step 1: Capture the legitimate request
With Burp Suite intercepting, he captured the profile request generated for his own authenticated account and inspected the response. Authenticated means the server knew who he was, because he was logged in with his own session. The server returned the account information tied to his own user ID. Nothing unusual at this stage. This step exists to establish a baseline: what does a correct, allowed request look like, and what does its answer contain? Without that baseline you cannot tell what is wrong later.
Step 2: Change the identifier
Still within the bug-bounty scope, meaning still inside the set of systems and actions the programme had authorised him to test, he substituted the user identifier with another test value. In practice this means editing the number in the captured request inside Burp Suite and sending it again. The request still returned:
HTTP/2 200 OK
Line by line:
HTTP/2is the version of the protocol used to talk between browser and server. A protocol is simply an agreed set of rules for a conversation. You do not need to know the details; it just tells you which rulebook was used.200is the status code, a three-digit number where the server reports how the request went.200means "OK, here is your answer". Other common ones are403, meaning "forbidden, you are not allowed", and404, meaning "not found".OKis the human-readable label for200.
A successful status alone was enough to warrant a closer look, but the decisive evidence was in the body. The body is the actual content of the reply, the data itself, as opposed to the status line that only says whether it worked.
Step 3: Inspect the response
He inspected the returned object and found it was associated with a different account. The server had accepted the identifier supplied by the client and returned data for that object without an appropriate check that the requester was entitled to it. The client here means his own browser and Burp Suite, the side making the request; the server is the machine that answers. That was the confirmation of an IDOR / Broken Object Level Authorization issue.
He describes the behaviour conceptually as the application doing this:
Client → "Give me user 182775"
Server → "Sure, here is the data."
In plain words: the client asks for the record of user number 182775, and the server simply hands it over. No question asked about who is asking.
When it should have been asking:
Who is making this request?
Which user are they allowed to access?Does that permission match the requested object?If not → deny the request.
In plain words, the correct conversation has three checks. First, who is this? Second, which records is this person allowed to see? Third, does the record they asked for fall inside that set? If the answer to the last check is no, the server should refuse. The arrow → just means "leads to" or "then".
Step 4: Establish scope with a small number of requests
After confirming the boundary could be crossed, he wanted to know whether this was an isolated mistake or a broader problem. He deliberately did not collect a database of users. A small number of controlled requests were enough to show that the server returned information for accounts other than his own, and that was already sufficient evidence for a report. The finding he reported is the authorisation failure itself, not the number of records that could be retrieved. This is a matter of responsible behaviour: proving a door is unlocked does not require emptying the house.
Step 5: Note the CORS configuration
While reviewing the response, he noticed permissive CORS headers, including:
Access-Control-Allow-Origin: *
Line by line:
Access-Control-Allow-Originis the name of a response header. A header is a labelled line of extra information attached to a request or response, like the notes written on an envelope alongside the letter.*is a wildcard meaning "any origin". An origin is the combination of scheme, host and port that identifies a website, roughly "which site is asking". So this header says: any website at all is allowed to read this response.
CORS, short for Cross-Origin Resource Sharing, is the set of rules a browser uses to decide whether a page from one website may read data from another website. A comparison: CORS is the guest list at a private club. If the list says "everyone", any club in town can walk in. By itself, CORS does not automatically create an account-data leak, and he is explicit about that distinction. The real vulnerability was the missing object-level authorisation. He included the CORS configuration as a supporting observation rather than claiming it was the root cause, noting that overly permissive CORS can increase exposure depending on the authentication model, browser behaviour, and whether credentials or other sensitive mechanisms are involved. The authentication model simply means the way the site decides who you are, for example cookies versus tokens.
Root cause
From an external testing perspective, the likely root cause was an insufficient server-side authorisation check. Server-side means the check happens on the server, the machine that owns the data, rather than in the browser. The API appeared to trust the requested object identifier instead of enforcing an authorisation relationship between the authenticated user and the requested object:
Authenticated User ↓Requested Object ↓Authorization Check
In plain words, this diagram lists the three things that must be connected: the logged-in user, the record they asked for, and the check that ties the two together. The downward arrows ↓ show the order in which the server should consider them. The correct implementation should verify authorisation on the server for every request. Hiding IDs, using numeric IDs, or relying on the frontend is not an access-control mechanism. The frontend is the part of the application that runs in your browser, the part you can see and click; anything enforced only there can be bypassed by talking to the server directly, which is exactly what Burp Suite lets you do.
Authentication itself worked: he was logged in normally, and the request was made as himself. Authorisation failed, because the server did not check that the object he asked for belonged to him. A comparison: authentication is the bouncer checking your ticket at the door; authorisation is the usher checking that your ticket is for the seat you are sitting in. You can have a valid ticket and still be in the wrong seat.
The numeric identifiers add a second dimension. Because the API uses predictable numeric user IDs, an attacker who can repeatedly request different identifiers and receive valid responses may be able to enumerate accounts at scale. To enumerate means to walk through values one by one, for example 1, 2, 3 and so on, and note which ones give a valid answer. That turns the question from whether one user's information can be accessed into whether the authorisation failure can be repeated across the application's user base, which is a much larger privacy concern.
Impact
The response contained more than a public profile identifier. Depending on the account, the API returned account metadata such as:
- Email address
- Account/member type
- Email verification status
- Phone verification status
- Password-related account state
- Application/verification status
- Timezone
- Language
- Currency
- Local-time information
Metadata here just means information about the account rather than the account's content. Any one of these fields might look harmless on its own, but returned together for another account the privacy impact is significant. The researcher's biggest concern was the exposure of email addresses, because an email address identifies a real person and is often the key to other services. Combined with predictable numeric identifiers, the flaw could potentially affect many users, which is why he rated it High. Severity ratings are labels programmes use to say how serious a finding is. He noted that the exact severity should depend on the programme's rules, the authentication requirements, the sensitivity of the exposed fields, and the demonstrated impact.
Fix
The fix is not simply changing numeric IDs to random IDs. Random identifiers make guessing harder, but they do not add a check; the server would still hand data to anyone who presents a valid-looking identifier. The application should implement proper server-side authorisation on every request:
Request arrives ↓Authenticate requester ↓Identify requested object ↓Check ownership/permission ↓Authorized? ↙ ↘ YES NO ↓ ↓Return data 403/404
In plain words, read the diagram top to bottom. A request arrives. The server works out who is asking. It works out which record is being requested. It checks whether that person owns or may access that record. Then it branches: if yes, return the data; if no, return 403 (forbidden) or 404 (not found). The diagonal arrows ↙ and ↘ show the two possible outcomes of the decision.
Additional defensive measures he lists:
- Enforce object-level authorisation on every API request.
- Avoid returning unnecessary sensitive fields.
- Apply least-privilege principles. Least privilege means giving each person and each piece of software only the access it actually needs, nothing more.
- Use appropriate access-control policies.
- Add automated authorisation tests. Automated means run by a machine on every change, so a regression is caught without a human remembering to check.
- Monitor abnormal object-ID access patterns. Abnormal here means unusual, for example one account requesting thousands of different identifiers in a short time.
- Rate-limit sensitive endpoints where appropriate. A rate limit caps how many requests can be made in a period, like a ticket machine that only dispenses one ticket per minute.
- Review CORS configuration according to the application's authentication model.
- Avoid relying on frontend restrictions for security.
The article does not say whether any of these were applied by the programme.
Variants to test
These are the same ideas applied in other places, written so a beginner can try them in an authorised programme only.
- IDs in URL paths. Send a request for your own object, then swap the path identifier for another test value. A positive result is a
200response whose body contains fields belonging to the other account. - IDs in query parameters and JSON bodies. A query parameter is the part of a URL after a question mark, like
?id=5; a JSON body is structured data sent inside a request. The same substitution applies. A positive result is data for an object you do not own coming back in the response. - Other object types. Document or file identifiers, order IDs, message IDs and organisation IDs. A positive result is any of these objects being returned to an account that should not see them.
- Numeric versus opaque identifiers. Predictable numeric IDs make enumeration practical; try sequential values within scope and watch for valid responses. A positive result would be successful responses for identifiers that are not yours. Opaque here means an identifier that gives no clue about its neighbours, such as a long random string.
- Permissive CORS on the same endpoint. Check for
Access-Control-Allow-Origin: *together with broad allowed headers and methods, and consider whether the authentication model makes that meaningful. A positive result would be a cross-origin readable response carrying account data, but only where credentials or other sensitive mechanisms are actually involved. - Authorisation versus authentication. Confirm that a fully authenticated session with no special role can still reach another user's object. A positive result is a normal authenticated user crossing the boundary, which shows the check is missing rather than merely misconfigured for one role.
Glossary
- API: the part of a website that pages talk to in order to fetch or send data, separate from what you see on screen.
- Authentication: proving who you are, for example by logging in.
- Authorisation: deciding what a known person is allowed to access or do.
- BOLA: Broken Object Level Authorization, the same flaw as IDOR, named from the missing check on a specific object.
- Body: the actual data in a request or response, as opposed to the status line and headers.
- Bug bounty: a programme where a company invites outside researchers to find and report security problems, usually for a reward.
- Burp Suite: a tool that sits between browser and website so you can see, pause and edit requests and responses.
- Client: the side making a request, normally your browser.
- Cookie: a small piece of data a website stores in your browser so it can recognise you between requests.
- CORS: Cross-Origin Resource Sharing, the browser rules that decide whether one website may read data from another.
- Endpoint: one specific address on a server that performs one specific job, such as
/api/user_info/{user_id}. - Enumeration: walking through values one by one, such as 1, 2, 3, to see which give a valid answer.
- Frontend: the part of an application that runs in your browser.
- GET: the request type meaning "give me something".
- Header: a labelled line of extra information attached to a request or response.
- HTTP/2: a version of the rules used for conversations between browser and server.
- IDOR: Insecure Direct Object Reference, a flaw where a record is handed out based on an identifier supplied by the client without an access check.
- JSON: a common text format for structured data sent in requests and responses.
- Least privilege: giving each person and program only the access it actually needs.
- Metadata: information about an account rather than its content, such as status flags and preferences.
- Object: one specific record on a server, such as one user's profile.
- Opaque identifier: an identifier that gives no clue about its neighbours, such as a long random string.
- Origin: the combination of scheme, host and port that identifies a website.
- Path: the part of a URL that says which feature on the server you are talking to.
- Protocol: an agreed set of rules for a conversation between machines.
- Query parameter: the part of a URL after a question mark, carrying extra values such as
?id=5. - Rate limit: a cap on how many requests can be made in a period.
- Response: the server's reply, made of a status line, headers and a body.
- Scope: the set of systems and actions a programme has authorised you to test.
- Server: the machine that stores data and answers requests.
- Server-side: happening on the server, where the data owner controls it.
- Session: the state of being logged in across several requests.
- Severity: a label for how serious a finding is.
- Status code: the three-digit number in a response saying how the request went, such as
200,403or404. - Token: a short string used to prove who you are, similar in purpose to a cookie.
- URL: the address of a web page or request.
- Wildcard: a symbol such as
*meaning "anything".