Skip to content
Access control Write-up Beginner

Crazy PII leak via API Misconfiguration

An API endpoint that returned user details did not require authentication, and user IDs were exposed on a public page. An attacker could enumerate all user IDs and retrieve personal data such as full names, dates of birth, addresses, ID documents, emails and phone numbers.

mares.viktor Follow

Published on medium.com

Hi everyone, today we’ll look at one of the external penetration tests that I carried out. The vulnerability has already been patched, however due to confidentiality agreements, the vulnerable website will be anonymized (hence, we will use the usual example.com domain).

Viktor Mares, 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

Impact

An attacker could retrieve personal data for every user, including full name, date of birth, address, ID document, email and phone number.

What the attacker needed

No authentication required; knowledge of user IDs

The fix

The vulnerability was fixed by adding an authentication check to the API endpoint.

How it was found

  1. Use directory brute forcing to find an information page that lists user names and UIDs.
  2. Review JavaScript files to discover an API endpoint that takes a UID as an argument.
  3. Request the API with a known UID and observe that no authentication is required.
  4. Write a script to iterate over all UIDs and save the returned personal data.

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.

A website had a page that listed users' names and their internal ID numbers. It also had an API (a way for programs to talk to the site) that, given an ID number, returned that person's private details. The API did not check whether the person asking was logged in, so anyone could ask for every user's data.

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.

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.