Skip to content
Access control Write-up Beginner

Unrestricted Access to All User Information | REST API Overshari

A REST API endpoint that returned the logged-in user's own details could be changed to a different path that returned every user's information. An attacker with any account could dump all user records, including email verification tokens, and use those tokens to verify other users' accounts.

tinopreter Follow

Published on infosecwriteups.com

🔗READ it for FREE

tinopreter, 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.

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

How it worked

Root cause

Likely the endpoint that listed all users had no authorisation check, so any authenticated user could call it and receive every record.

Impact

Any registered user could read the personal details of all users and obtain their email verification tokens, which could allow accounts to be verified without owning the mailbox.

What the attacker needed

A free account on the onboarding app; ability to send requests to the API

The fix

The endpoint should enforce role-based access control so that only administrators can list all users.

How it was found

  1. Sign up and log in to the onboarding application.
  2. Observe the GET request the app makes to the user details endpoint.
  3. Change the path from the personal endpoint to the all-users endpoint.
  4. Receive a large response containing every user's information.
  5. Compare the verification token in your own record with the one in your email to confirm they match.
  6. Request the all-users endpoint again and see other users' verification tokens in the response.

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 write-up has not been written yet. The Original tab links to the source.

An API is the part of a website that apps talk to in order to fetch data. Here the site had one address that returned only your own details, but a neighbouring address returned everyone's details and did not check who was asking. Anyone with a normal account could read the whole user list, including secret codes sent by email to confirm accounts.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by tinopreter

View all

8 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.