The Server Gave Me the Tokens. I Just Used Them.
The enrollment API returned the activation token in its JSON response before the user had verified their email. An attacker could use that token to activate an account belonging to someone else without access to their inbox.
medium.com
Published on medium.com
My first bug bounty write-up — an IDOR that let me bypass email-based activation by using credentials the server handed over for free.
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 enrollment endpoint included the activation token in its response body instead of sending it only by email, and the activation step did not check that the email link had actually been used.
Impact
An attacker could activate and operate an account belonging to another person, such as a doctor or practice, without access to that person's email.
What the attacker needed
Target uses email activation; attacker can submit enrollment request
The fix
The token should never appear in the API response and should only be sent by email, and the server should confirm the activation came through the email link before allowing further steps.
How it was found
- Send a POST request with an email address to the enrollment endpoint.
- Read the JSON response and find the activation token field.
- Build the activation URL using that token.
- Open the URL in a browser to activate the account without using the email link.
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.
When you sign up, a site usually emails you a secret link to prove the address is yours. Here the server also put that secret in the reply it sent straight back to the browser, so anyone could read it without opening the email. With that secret, a person could finish activating an account that was not theirs.
What is IDOR?
One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.