Skip to content
Account takeover Write-up Intermediate

Zero-Click Account Takeover [Critical bug]

A password reset endpoint leaked a state token (JWT) belonging to the victim's account when a captcha was requested. An attacker could use this leaked token to reset the victim's password without any interaction, leading to account takeover.

medium.com

Published on medium.com

قال تعالى: ﴿فَقُلْتُ اسْتَغْفِرُوا رَبَّكُ� ْ إِنَّهُ كَانَ غَفَّارًا يُرْسِلِ السَّ� َاءَ عَلَيْكُ� ْ � ِدْرَارًا وَيُ� ْدِدْكُ� ْ بِأَ� ْوَالٍ وَبَنِينَ وَيَجْعَلْ لَكُ� ْ جَنَّاتٍ وَيَجْعَلْ لَكُ� ْ أَنْهَارًا﴾

Osamamohamed (db3wy), 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 password reset endpoint included a state token (JWT) for the victim's session in the response when a captcha was triggered, allowing an attacker to obtain and reuse it.

Impact

An attacker could reset the victim's password without any interaction, leading to full account takeover.

What the attacker needed

Victim's email address; attacker has an account; captcha must appear

How it was found

  1. Go to the password reset page and enter the victim's email address to initiate a reset.
  2. Also initiate a password reset for the attacker's own account.
  3. Intercept the HTTP request to the password reset start endpoint using a proxy tool.
  4. Identify and save the JWT token from the response of the victim's request (may require repeating until a captcha appears).
  5. Complete the password reset process for the attacker's account by entering the OTP received.
  6. Before sending the final password set request, replace the JWT value with the victim's leaked JWT and send it.

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, websites often send a secret code to prove it's you. Here, the website accidentally included a secret code for the victim's account in a response that the attacker could see. The attacker could then use that code to change the victim's password without the victim doing anything.

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.

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.