Skip to content
Account takeover Write-up Beginner

How I Found an Account Takeover (ATO) in Swisscom

Password reset tokens were never invalidated after use or when new ones were issued, so an old token from a previous reset email remained valid indefinitely. An attacker who obtained any reset email could use its token to reset the password and take over the account, even after the victim changed their password.

m0ro23 Follow

Published on medium.com

When you request a password reset, the app sends you a token by email. The problem is old tokens never get killed off.

m0ro23, 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

Each reset token was treated independently, with no logic to invalidate other tokens when one was used or when a new one was issued.

Impact

If an attacker obtains any reset email, old or new, they have a permanent way back into the account, exposing personal data, saved payment info, and booking history.

What the attacker needed

Attacker obtains a reset email; victim has requested at least one reset

The fix

The report recommends invalidating all other tokens when one is used, invalidating old tokens when a new reset is requested, keeping expiry short, logging out sessions after reset, and marking tokens as single-use in the database.

How it was found

  1. Request a password reset and receive a token by email.
  2. Request another password reset and receive a second token.
  3. Use the second token to reset the password successfully.
  4. Retrieve the first token from the earlier email.
  5. Submit the first token to the reset endpoint.
  6. The first token still works and allows another password change.

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 forget your password, a website emails you a special link with a secret code (a token) to prove it's you. This site made a new code each time you asked, but never cancelled the old ones. So if someone got hold of an old email, they could still use its code to change your password, even after you'd already changed it.

What is Account takeover?

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.

More by m0ro23

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.