How an Unhandled Unicode Normalization Mismatch Led to a $5,000 Account Takeover
The authentication service lowercased emails without full Unicode normalization, while a password reset microservice applied NFKC normalization before querying the database. An attacker could register an account with a lookalike Unicode character and then trigger a password reset that resolved to the victim's canonical email, leading to account takeover.
Character encoding discrepancies between an application’s authentication layer and its database storage are a frequently overlooked attack vector in modern web applications. While most security audits focus on input sanitization for command execution or SQL injection, subtle differences in how string normalization…
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 inconsistent Unicode normalization: the registration service only lowercased input, while the password reset service applied NFKC normalization before database lookups, causing different strings to map to the same account.
Impact
An attacker could take over arbitrary user accounts, including administrative ones, by exploiting the normalization mismatch during password reset.
What the attacker needed
Ability to register an account; ability to trigger password reset; victim has a known email address
The fix
The report recommends applying consistent Unicode normalization (NFKC or NFKD) at the API gateway before any validation or database lookups, restricting email character sets, and storing normalized emails with a unique index.
How it was found
- Identify a high-privilege user account to target.
- Register a new account using a Unicode lookalike character in the email address.
- Trigger a password reset request using the same Unicode lookalike email.
- The password reset service normalizes the email and resolves it to the victim's account, sending the reset token to the attacker.
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.
Different parts of a website can treat the same text in slightly different ways. Here, the sign-up page and the password reset page disagreed about whether a special Unicode character (the Kelvin sign) was the same as a normal letter 'k'. An attacker could sign up with a lookalike email and then use the password reset to take over someone else'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.