Skip to content
Info disclosure Write-up Beginner

How Misconfigured API leaked user private information?

An API endpoint that returned user data by user ID also accepted a username in the same field, exposing private information such as email, userId, userName and scope without authorisation. An attacker could replace the user ID with a username to retrieve another user's sensitive data.

Yeasir Arafat Follow

Published on medium.com

Hello folks, it’s been a long since I didn’t post an article about my findings, hence I was busy with my personal life.

Yeasir Arafat, 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 endpoint did not properly validate or restrict the identifier used to look up user data, allowing a username to be used in place of a user ID.

Impact

An attacker could obtain private user information such as email addresses, user IDs, usernames and scope without authorisation.

What the attacker needed

Knowledge of a username; no authentication required

The fix

The report states the bug was fixed, but does not describe the fix; likely the API should enforce proper authorisation and validate the identifier type.

How it was found

  1. Read the API documentation to understand how the site fetches user data.
  2. Try the endpoint with a user ID without authorisation and observe a 404 error.
  3. Replace the user ID with a username in the same endpoint.
  4. Observe that the API returns sensitive user information such as email, userId, userName and scope.

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 a way for websites to talk to servers and fetch data. Here, the server was supposed to return data only when given a special user ID, but it also accepted a username and returned private details like email addresses. This meant anyone could look up other users' information just by knowing their username.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by Yeasir Arafat

View all

4 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.