The Punycode Paradox: When Unicode Normalization Turns Into an AT
The application normalised Unicode email addresses for account existence checks but used the raw address for SMTP routing, so an attacker could register or reset a password for a victim's account and receive the verification code at an attacker-controlled domain. This allowed a zero-interaction account takeover.
In the world of Bug Bounties, the “Punycode Account Takeover”is a classic. Usually, the story is predictable: you try to register with a look-alike email, the server says “Email already exists,” and you realize the backend is merging your fake email with a real one.
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
The application used different email normalisation logic for database lookups versus SMTP routing, creating a mismatch that allowed an attacker to receive codes meant for a victim.
Impact
An attacker could take over any account without victim interaction by receiving the verification or reset code.
What the attacker needed
Attacker-controlled domain; victim has an account
The fix
The application should normalise email addresses consistently at the edge and use the normalised version for all operations, including SMTP routing.
How it was found
- Intercept the sign-up request with Burp Suite.
- Replace the normal email with a Punycode email that normalises to the victim's address.
- Receive the verification code at the attacker-controlled domain.
- Intercept the forgot-password request and inject the Punycode domain.
- Receive the password reset code and set a new password.
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.
Email addresses can contain accented characters like é. The server treated 'édny.net' as the same as 'edny.net' when checking if an account exists, but sent the email to the accented version. The attacker controlled the accented domain, so they received the victim's verification code and could take over the account.
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.