Skip to content
Access control Write-up Beginner

How Broken Authorization and Excessive Data Exposure Led to a CVS

The API's admin endpoints for listing and fetching users lacked role and ownership checks, so any authenticated user could read every user's record. Those records included plaintext PINs and 2FA secrets, letting an attacker generate valid one-time codes and take over admin accounts.

Pankaj Kumar Yadav Follow

Published on medium.com

During a recent security assessment of redated.com, I discover a series of critical vulnerabilities in the platform’s API that could allow any authenticated user to access admin-level data, view sensitive user information, and potentially take over accounts. This post breaks down the findings, the attack chain, and…

Pankaj Kumar Yadav, on medium.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 API performed authentication but no authorization checks on admin-only functions or on individual user objects, and it returned far more fields than needed.

Impact

An attacker with only a normal account could read every user's personal data and 2FA secrets, and could use those secrets to take over administrator accounts and gain full system control.

What the attacker needed

A normal user account; a proxy tool such as Burp Suite

The fix

Admin endpoints should be restricted to admin roles with server-side role checks on every request, object-level ownership checks should be added, and sensitive fields such as passwords, PINs and 2FA secrets should never be returned in API responses.

How it was found

  1. Log in as a normal user and capture the JWT token.
  2. Request the admin user list endpoint with that token to enumerate all accounts, including admins.
  3. Request the single-user endpoint while changing the numeric id to extract each admin's 2FA secret.
  4. Generate valid one-time codes from the stolen secret and compromise admin accounts.

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 behind the scenes. Here, the server never checked whether the person asking was an administrator or the owner of the data, so a normal logged-in user could ask for the full user list and each person's private details. Because those details included the secret used for two-factor authentication (the second login code), an attacker could log in as an administrator.

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 Pankaj Kumar Yadav

View all

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