Skip to content
Race condition Write-up Intermediate

From P5 to P2 to 100 BXSS

A race condition allowed an attacker to verify an arbitrary email address without access to it, and by injecting a blind XSS payload into the email field, the attacker could execute JavaScript in an administrator's browser when the admin viewed the profile, leading to session hijacking.

Mohamed Daher Follow

Published on medium.com

Bounty$1,000 View original

As you asked for on twitter (make sure to follow me @DaherMohamed4 )

Mohamed Daher, 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 a race condition in the email verification process allowed the verification of an email address that was not actually controlled by the user, and the email field was not properly sanitised before being displayed to administrators.

Impact

The attacker could steal an administrator's session cookie and gain access to the internal panel.

What the attacker needed

A free account; ability to intercept and modify requests; admin views the profile

How it was found

  1. Add an email to the account and open the verification email but do not click the link.
  2. On the website, click 'change email' and enter the desired email address without verification.
  3. Click the verification link and change the email at the same time (using Burp to forward both requests together).
  4. The new email is verified and you can log in.
  5. Repeat the process but enter a blind XSS payload as the email address.
  6. Create a forum thread and report it to attract an admin, who triggers the XSS when viewing your profile.

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 website let you change your email and verify it, but by sending two requests at almost the same time, you could trick it into marking an email as verified even though you never received the verification link. Then, by putting a malicious script in the email field, when an admin looked at your profile, the script ran in their browser and stole their session.

What is Race condition?

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.

More by Mohamed Daher

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Race conditions

The lesson behind this report.

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.