Skip to content
IDOR Disclosed report Beginner

IDOR in TalentMAP API can be abused to enumerate personal information of all the users

An API endpoint that returns user permission data did not check whether the caller was allowed to view the requested user, so any logged-in guest could request other users' records by changing the user ID. An attacker could cycle through IDs to enumerate personal information for every user in the database.

nhx1 Follow

Originally disclosed on HackerOne

High 7.5 View original
  • Triaged in 22 hours
  • Fixed in 35 days
  • Disclosed after 2 months

Summary:

I hope you're having a good day. Before starting to describe this vulnerability, I would like to thank the HackerOne triage team for doing the difficult job of triaging all these issues.

I observed an IDOR vulnerability in one of the endpoints in the Talentmap API. This vulnerability is similar to #1809328. In this report I will demonstrate ways to enumerate all user accounts in the Talentmap API logged in as a guest user. To triage this vulnerability, you need to manually build it in your system, the build instructions can be accessed in the report #1809328 where HackerOne team has successfully built the Talentmap API. However, if you're having issues building it, drop a message!

After building the API, please go inside the docker container and run the following commands to create_seeded_users.

  1. $ python manage.py create_demo_environment
  2. $ python manage.py create_seeded_users

Also, go into the docker container and create some test users:

  1. $ python manage.py create_user normalUser [email protected] normalUser123 Normal User
  2. $ python manage.py create_user normalUser1 [email protected] normalUser123 Normal User
  3. $ python manage.py create_user normalUser2 [email protected] normalUser123 Normal User

** Some details: ** i. The vulnerable endpoint = http://localhost:8000/api/v1/permission/user/{USER_ID}/

Steps To Reproduce:

[add details for how we can reproduce the issue]

  1. After running the API, browse http://localhost:8000 and login using the credentials username: guest , password: guestpassword , and copy the token obtained in the respones
image.png
image.png From the original on HackerOne
image.png
image.png
  1. Send the following request to http://localhost:8000. Replace {USER_ID} to the user id of the user you want to enumerate information of. Replace {token} to the token you obtained in step 1
GET /api/v1/permission/user/{USER_ID}/ HTTP/1.1

Host: localhost:8000
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0
Accept: application/json
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://localhost:8000/
JWT: {token}
Connection: close
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
  1. Observe user information returned in the response

Additionally, you could also use Burp intruder to cycle through user-ids from 1 to 100 to get information of all users in the database.

image.png
image.png From the original on HackerOne

##Remediation Guidance

Implement access control mechanism. Allow the user to only fetch their information.

Supporting Material/References:

[list any additional material (e.g. screenshots, logs, etc.)]

  • [attachment / reference]

Impact

A malicious actor could fetch information of all users and cause a data breach

The original report as published on HackerOne, by nhx1. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the endpoint fetched the user record by the supplied ID without verifying that the authenticated caller was that user or otherwise authorised.

Impact

A malicious actor could fetch information of all users and cause a data breach.

What the attacker needed

Guest account on the API; ability to guess or iterate user IDs

How it was found

  1. Log in to the local instance as the guest account and copy the returned token.
  2. Send a request to the user permission endpoint, substituting the target user's ID and the token.
  3. Observe the other user's information in the response.
  4. Optionally use an interception tool to iterate over user IDs from 1 to 100.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

An IDOR (insecure direct object reference) happens when a website looks up a record using an ID from the request but never checks that the person asking is allowed to see that record. Here the ID was a user number in the URL, so changing the number returned someone else's details. Because the numbers are simple and sequential, a script can walk through them all and collect everyone's data.

What is IDOR?

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.

More by nhx1

View all

3 more disclosed reports, best first.

More from U.S. Department of State

View all

The newest disclosed reports for this program.

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.