Full Account Takeover (0-Click ATO) — My Story with a Critical Vulnerability
The registration endpoint accepted an email address containing a null byte, allowing an attacker to register a second account using the same email but a new password. The attacker could then log in with that password and take over the victim's account without any interaction.
Published on nayefhamouda.medium.com
My name is Nayef Hamouda. I am a Web Application Penetration Tester and also work part-time as a Bug Bounty Hunter.
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 application failed to sanitise or reject null bytes in the email parameter during registration, causing inconsistent handling of the email string.
Impact
An attacker could take over any user's account without victim interaction, gaining access to sensitive data and potentially escalating privileges if the account belongs to an employee.
What the attacker needed
Knowledge of victim's email; ability to intercept HTTP requests
The fix
The application should be fixed by properly validating and sanitising email input to reject null bytes and other special characters.
How it was found
- Register a new account with a test email address.
- Log out and try to register again with the same email but a different password.
- Intercept the registration request and modify the email parameter to include a null byte.
- Forward the modified request, which is accepted and creates a new account with the chosen password.
- Log in using the victim's email and the new password to access the victim's account.
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.
A null byte is a special character that some programs treat as the end of a text string. If a website does not clean it out of an email address, the site might think the email is different from the real one and let someone create a second account with the same email. The attacker can then set a new password and log in as the victim.
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.