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.
Published on medium.com
As you asked for on twitter (make sure to follow me @DaherMohamed4 )
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
- Add an email to the account and open the verification email but do not click the link.
- On the website, click 'change email' and enter the desired email address without verification.
- Click the verification link and change the email at the same time (using Burp to forward both requests together).
- The new email is verified and you can log in.
- Repeat the process but enter a blind XSS payload as the email address.
- 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.