IDOR leads to PII Leak
The profile update page used a numeric user identifier in the URL without checking that it belonged to the logged-in user. By changing that number, an attacker could view other users' email addresses and names.
Originally disclosed on HackerOne
- Triaged in 23 hours
- Fixed in 14 days
- Disclosed after 15 days
Hii Triager,
Through research, I discovered a vulnerability in DoD, that exposes other users' email addresses through IDOR.
Vulnerable domain: www.███████
Step To Reproduce
1 - Naviagate to https://www.█████████/ , Create an account.
2 - Go to Update Profile Section i..e -> https://www.█████/JOINOnline/UpdateProfile/<user-id>
3 - Change the Numeric user-id to any other, and you'll see other user's email-addresses.
Impact
1 - Leaks Users Email (PII) and Name 2 - IDOR
System Host(s)
www.███
Affected Product(s) and Version(s)
CVE Numbers
Steps to Reproduce
Step To Reproduce
1 - Naviagate to https://www.████████/ , Create an account.
2 - Go to Update Profile Section i..e -> https://www.███████/JOINOnline/UpdateProfile/<user-id>
3 - Change the Numeric user-id to any other, and you'll see other user's email-addresses.
Suggested Mitigation/Remediation Actions
1 - Chain the User session with user-id in the backend
Context
The target is a U.S. Department of Defence web application reachable at www.███████. The feature involved is the account profile area, specifically the Update Profile section. After creating an account, a user reaches their profile through a URL that carries their numeric user identifier in the path:
https://www.█████/JOINOnline/UpdateProfile/<user-id>
The application uses that path segment to decide which profile record to load. The report describes the result as an Insecure Direct Object Reference (IDOR) that exposes other users' email addresses.
Setup
The only precondition is a normal account on the site. The researcher created one, then navigated to the Update Profile section. No special tooling, role or version is described in the report.
Finding it
The profile page is addressed by a numeric user-id in the URL path. Because the identifier is a plain number and sits directly in the path, it is a natural candidate for an object reference test: change the number and see whether the application returns a different user's record. The researcher did exactly that and found that the page rendered other users' email addresses.
Exploitation
Step 1: Create an account
Navigate to the site and register:
https://www.█████████/
A valid session is needed so the profile page can be reached at all.
Step 2: Open the Update Profile section
The profile page is reached at:
https://www.█████/JOINOnline/UpdateProfile/<user-id>
The <user-id> segment is the numeric identifier of the account whose profile is being viewed.
Step 3: Change the numeric user-id
Replace the numeric user-id in the path with any other value. The page then displays the email address of the user that identifier belongs to. The report does not include the raw request or response, only the URL pattern and the observed result.
Root cause
The application takes the user identifier straight from the URL path and uses it to look up the profile record, without checking that the identifier belongs to the authenticated session. The report's suggested remediation states the fix directly: the user session should be chained with the user-id in the backend. In other words, the server should derive the record from the session rather than trusting the client-supplied identifier. The report does not describe any authorisation check that was present and bypassed, so the likely cause is a missing ownership check on the profile lookup.
Impact
According to the report, the issue leaks users' email addresses (PII) and names. The exposure applies to any account whose numeric identifier the attacker supplies, so any account whose numeric identifier is supplied can have its email address and name exposed. The report does not state how many records are affected or whether any other fields are returned.
Fix
The report proposes one remediation: chain the user session with the user-id in the backend. Concretely, the server should confirm that the identifier in the request matches the authenticated user before returning the profile, or ignore the client-supplied identifier entirely and load the profile from the session.
- Replace the numeric identifier in other profile or account URLs with neighbouring values and check whether another user's data is returned.
- Try the same substitution on endpoints that return JSON or API responses rather than HTML pages, where more fields may be exposed.
- Test whether the identifier can be supplied in a query parameter or body field instead of the path, in case the check is applied to only one location.
- Check whether the response differs between an authenticated session and no session, to see whether authentication alone is the only control.
A positive result is any response that contains another user's email address, name or other account data when the identifier does not belong to the current session.
This kind of bug tends to hide in profile, account and settings pages where the record is addressed by a numeric identifier in the URL. During recon, look for paths containing sequential numbers, especially ones tied to user accounts. The signal is a URL like /UpdateProfile/<user-id> where the identifier is a plain integer. To show impact, demonstrate that changing the identifier returns another user's data, and identify the sensitive fields returned, here email address and name. The report keeps the demonstration short: create an account, open the profile, change the number, observe the leak.
What happened, in plain words
A security researcher found a bug on a U.S. Department of Defence website. The site lets people create an account and then edit their profile. Each profile has its own web address, and that address ends with a number that identifies the account, for example a number that identifies one account.
The problem is that the site trusted that number completely. If you were logged in as yourself and you changed the number in the address bar to somebody else's number, the site showed you that other person's profile details, including their email address. You were never supposed to see anyone else's data.
This kind of mistake has a name: Insecure Direct Object Reference, or IDOR. "Object" here means a record in the site's database, such as a user profile. "Direct reference" means the site lets you point at that record directly, using an identifier you can see and edit. "Insecure" means the site does not check whether you are allowed to look at that particular record. A simple comparison: imagine a hotel where every room key is just the room number written on a card. If the front desk never checks that the number on your card matches the room you are standing in front of, you can write any number on the card and open any door. The number is the "direct reference"; the missing check at the door is the "insecure" part.
The leaked information is personal data: email addresses and names.
The target and the feature
The target is a web application belonging to the U.S. Department of Defence, reachable at www.███████. The report hides the exact domain name, which is normal for reports about sensitive systems.
The feature involved is the account profile area, specifically the Update Profile section. A profile page is where you see and change your own details: your name, your email address and similar information. To show your profile, the site has to know which profile to load, and it does that by reading a number from the web address.
A web address (URL) is made of parts. In https://www.█████/JOINOnline/UpdateProfile/<user-id>, the part after the domain, /JOINOnline/UpdateProfile/<user-id>, is called the path. The last piece of the path, <user-id>, is a placeholder for a number. In a real visit it would be something like 1234. The site takes that number, looks it up in its database and builds the page for that account.
That design is not wrong by itself. Many sites do it. What matters is whether the site also checks that the person making the request is the owner of that number. Here, it did not.
Setting things up
The only thing you need before trying this is a normal account on the site. The researcher created one and then opened the Update Profile section. The report does not mention any special tools, any particular user role, or any software version. You do not need to install anything: a browser and an account are enough.
Why create an account first? Because the profile page sits behind a login. A session is what the site remembers about you after you log in. When you sign in, the server sends your browser a small piece of data, usually stored in a cookie, which the browser sends back with every later request. That cookie is how the site recognises you on the next page. Without a valid session, the profile page would probably just send you to the login screen, so you could never reach the interesting part. The researcher needed a logged-in session to get to the profile page at all.
Finding it
The profile page is addressed by a numeric user-id in the URL path. Two things make this a natural place to test. First, the identifier is a plain number, and plain numbers tend to run in sequence: 1001, 1002, 1003. Second, the number sits directly in the path, where anyone can see it and edit it in the address bar.
So the test is simple: change the number and see whether the site returns a different person's record. This is the core idea behind testing for IDOR. You are not breaking any encryption or guessing a password. You are simply asking the site for a different record by changing the label on the request, and watching whether the site hands it over without asking who you are.
The researcher changed the number and found that the page displayed other users' email addresses.
Step by step
Step 1: Create an account
Navigate to the site and register:
https://www.█████████/
This line is just the address of the website's home page. You open it in a browser, find the sign-up form and create an account with your own details. The purpose of this step is to obtain a valid session, because the profile page can only be reached by a logged-in user. The report does not describe the registration form or what information it asks for.
Step 2: Open the Update Profile section
The profile page is reached at:
https://www.█████/JOINOnline/UpdateProfile/<user-id>
Reading this address from left to right: https:// means the connection is encrypted with TLS, the standard way browsers protect traffic. www.█████ is the site's domain, hidden in the report. /JOINOnline/UpdateProfile/ is the path that tells the server which page you want, here the profile update page. <user-id> is the number of the account whose profile is being viewed. When you log in and click through to your profile, your browser lands on this address with your own number in the last position. The purpose of this step is to see the shape of the address and notice that your account is identified by a number you can read.
Step 3: Change the numeric user-id
Replace the numeric user-id in the path with any other value. The page then displays the email address of the user that identifier belongs to.
In practice: you click into the address bar, delete your own number, type a different number, and press Enter. The browser sends a new request to the server. The server reads the number from the path, fetches the matching profile from its database, and builds the page. Because it never checks that the number belongs to the session making the request, it happily returns somebody else's profile. The report does not include the raw request or response, only the URL pattern and the observed result, so we cannot see the exact HTML that came back. What the report does say is that the email address of the other user appeared on the page.
Why it works
When your browser asks for a page, the server has two pieces of information: who you are (from your session cookie) and which record you asked for (from the number in the URL). A correct implementation compares the two. It asks: does the record this person is asking for belong to the person asking? If not, it refuses.
Here, the application took the user identifier straight from the URL path and used it to look up the profile record, without checking that the identifier belonged to the authenticated session. The report's suggested fix says it directly: the user session should be chained with the user-id in the backend. "Chained" means tied together: the server should derive the record from the session rather than trusting the number the client supplied. The client, meaning your browser, is under your control, so anything it sends can be changed. The server must not treat it as proof of identity.
That points to a missing ownership check on the profile lookup rather than a broken one.
Impact
According to the report, the issue leaks users' email addresses, which are personal data (PII, or personally identifiable information), and their names. Because the identifier is a number, an attacker can supply another value and see the email address and name attached to it.
Why does this matter if it is "only" an email address and a name? Because a list of real names matched to real email addresses at a government domain is useful to someone planning phishing: a convincing email that addresses you by name and appears to come from a site you actually use is far more likely to be opened. It can also confirm that a given person has an account on the system, which may itself be sensitive.
The fix
The report proposes one remediation: chain the user session with the user-id in the backend. In plain terms, the server should confirm that the identifier in the request matches the authenticated user before returning the profile, or ignore the client-supplied identifier entirely and load the profile from the session. The second option is the stronger habit: if the server never reads the number from the URL for this purpose, there is nothing for an attacker to change.
Other places to look
Once you understand the pattern, you can look for it elsewhere.
- Replace the numeric identifier in other profile or account URLs with neighbouring values and check whether another user's data is returned.
- Try the same substitution on endpoints that return JSON or API responses rather than HTML pages, where more fields may be exposed. An API is the part of a site that returns raw data, usually in a machine-readable format such as JSON, instead of a finished web page; it is what mobile apps and scripts talk to.
- Test whether the identifier can be supplied in a query parameter or body field instead of the path, in case the check is applied to only one location. A query parameter is the part of a URL after a question mark, like
?id=1234; the body is the data sent with a form submission or an API request. - Check whether the response differs between an authenticated session and no session, to see whether authentication alone is the only control. If a logged-out request also returns data, the problem is worse than a missing ownership check.
A positive result is any response that contains another user's email address, name or other account data when the identifier does not belong to the current session.
This kind of bug tends to appear in profile, account and settings pages, where the record is addressed by a numeric identifier in the URL. During reconnaissance, meaning the early phase of looking around a target to map what it contains, look for paths containing sequential numbers, especially ones tied to user accounts. The signal is a URL like /UpdateProfile/<user-id> where the identifier is a plain integer.
To show impact, demonstrate that changing the identifier returns another user's data, and identify the sensitive fields returned, here the email address and the name. The report keeps the demonstration short: create an account, open the profile, change the number, observe the leak.
Glossary
- IDOR (Insecure Direct Object Reference): a bug where a site lets you reach a record by changing an identifier in a request, without checking that the record belongs to you.
- Object: a single record in a site's database, such as one user's profile.
- Identifier (ID): a value, often a number, that names one specific record so the site can find it.
- URL: the address of a page or resource on the web, typed into the address bar.
- Path: the part of a URL after the domain, such as
/JOINOnline/UpdateProfile/1234, which tells the server which page you want. - Domain: the site's name in a URL, such as
www.example.com. - HTTPS / TLS: the encrypted version of web traffic, shown by
https://and the padlock in the browser. - Session: what a site remembers about you after you log in, so it can recognise you on later pages.
- Cookie: a small piece of data the site stores in your browser and your browser sends back with each request, commonly used to carry the session.
- Authentication: proving who you are, usually by logging in.
- Authorisation: deciding what a logged-in user is allowed to see or do.
- Ownership check: a specific authorisation check confirming that the record requested belongs to the user making the request.
- PII (personally identifiable information): data that can identify a real person, such as a name or email address.
- Enumeration: trying identifiers one after another, such as 1001, 1002, 1003, to collect the records behind them.
- API: the part of a site that returns raw data, often in JSON, for apps and scripts rather than finished web pages.
- JSON: a simple text format for structured data, made of names and values in curly braces.
- Query parameter: a value in a URL after a question mark, such as
?id=1234. - Request body: the data sent along with a form submission or API request, separate from the URL.
- Reconnaissance: the early phase of exploring a target to understand what it contains and where to look.
- Severity: a rating of how serious a bug is, here medium.
- Remediation: the fix for a vulnerability.