From Gmail to Gmàil: A Punycode Path to Account Takeover
The application accepted an email address containing a non-ASCII character in the domain (a homograph of gmail.com) during signup and password reset. An attacker could register with such an address and receive the victim's password reset link, leading to account takeover.
medium.com
Published on medium.com
Internationalized Domain Name (IDN) Homograph Attacks exploit characters from different languages that look identical to humans but are totally different to computers. Think Latin “a” vs Cyrillic “à”.
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 did not normalise or restrict email addresses to ASCII, so it treated a Unicode homograph domain as equivalent to the legitimate one when sending password reset emails.
Impact
An attacker could take over accounts by receiving password reset links, potentially locking out the real user and accessing sensitive data; no user interaction is needed.
What the attacker needed
Attacker-controlled email domain; victim's email address known; ability to intercept requests (e.g., Burp)
The fix
The application should restrict email addresses to ASCII, normalise inputs consistently, and reject suspicious punycode domains unless explicitly required.
How it was found
- Register on the website using an email address with a domain controlled by the attacker (e.g., a Burp Collaborator domain).
- Log out and initiate the 'Forgot Password' flow, entering the same email address.
- Intercept the request and change the domain part of the email to a homograph domain (e.g., gmàil.com).
- Receive the password reset link at the attacker-controlled server.
- Use the link to reset the password and log in as the victim.
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.
Some letters look the same but are actually different characters in computers, like a normal 'a' and an 'a' with an accent. If a website treats them as the same when handling email addresses, an attacker can use a lookalike address to receive emails meant for someone else. Here, the attacker used a lookalike Gmail address to get a password reset link for another user's 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.