Skip to content
Info disclosure Write-up Intermediate

From data leak to account takeover

The API returned excessive user data including password hashes and email verification tokens, and team information leaked password reset tokens of team members. An attacker could invite a target to a team, leak their reset token, and change their password, leading to account takeover.

Antony Garand Follow

Published on dev.to

While browsing the web, I ended up finding a startup which recently launched its product. Like any normal person, I decided to perform a security audit to hopefully find vulnerabilities!

Antony Garand (@AntoGarand), on dev.to

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

The API returned the entire user document and team information, including sensitive fields like password hashes and password reset tokens, to the client.

Impact

An attacker could take over any account by leaking password reset tokens, and also lock the user out by changing and validating a new email.

What the attacker needed

A free account; victim's email address

The fix

The API should only return necessary fields and never expose sensitive tokens or password hashes.

How it was found

  1. Perform a password change request for the target user.
  2. Create a new team.
  3. Invite the target user to the team.
  4. Leak the password reset token via the team information returned by the API.
  5. Change the victim's password using the leaked token.

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.

The app's API sent back more information than needed, like a scrambled version of the password and special tokens used to verify email or reset passwords. An attacker could use these tokens to take over other people's accounts by inviting them to a team and reading their reset token.

What is Info disclosure?

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

More by Antony Garand

View all

1 more disclosed report, 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.