Hacking GitHub with Unicode's dotless 'i'
GitHub's password reset flow lowercased the supplied email address and compared it to the stored address, but then sent the reset link to the original, non-lowercased address. An attacker could claim an email address containing Unicode characters that normalise to another user's address and receive that user's reset token.
Published on web.archive.org
From combining emoji marks and astral planes, Unicode is under appreciated and poorly understood. The importance of understanding Unicode extends beyond localization and diversity.
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 system normalised the supplied email address for comparison but used the original, unnormalised address for delivery, so a Unicode variant could match a victim's account while delivering the reset token to the attacker.
Impact
An attacker could take over another user's account by receiving their password reset token, but only if the attacker can register an email address containing Unicode that normalises to the victim's address and the email provider allows such characters in the local part.
What the attacker needed
Attacker can register an email with Unicode local part; victim's email provider allows Unicode local part; attacker knows victim's email address
The fix
GitHub fixed the issue by ensuring the email address in the database matches the address that initiated the reset flow, so the token is sent to the stored address.
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 characters look different but become the same when you change their case. For example, the Turkish dotless 'i' becomes a normal 'I' when uppercased. GitHub compared email addresses after lowercasing them, so two different addresses could match. But it sent the reset email to the address the attacker typed, not the one on file, so the attacker got the victim's reset link.
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.