Bypass auth.email-domains (2)
The email-domain allow-list check could be bypassed because MySQL truncates a string at the first Unicode character above 0xFFFF when storing it in a utf8 column. An attacker could register with an address that appears to belong to an allowed domain but is actually stored as a different address.
- Triaged in under an hour
- Fixed in 6 hours
- Paid in 6 hours
- Disclosed after 30 days
This vulnerability has the same effect as my previously reported bug #2224 Bypass auth.email-domains, but uses a very different approach, bypassing the current fix.
Instead of truncating through length, this vulnerability uses truncation via MySQL’s (weird) behaviour on inserting Unicode characters with code points greater than 0xFFFF into columns that have a utf8 charset. MySQL then truncates a string as soon as it reaches such a character. For more info, see How to support full Unicode in MySQL databases by @mathias.
To replicate, register an account with following address: [email protected]𝌆@allowed-domain.com.
I would suggest to reconsider not verifying email addresses as was mentioned here.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker could bypass the email-domain restriction and register an account that should not have been allowed, the same effect as the earlier report.
What the attacker needed
Ability to register an account
The fix
The author suggests reconsidering not verifying email addresses.
How it was found
- Register an account using an email address that contains a Unicode character above 0xFFFF before the allowed domain.
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 report has not been written yet. The Original tab links to the source.
A website can restrict sign-ups to certain email domains, such as only company addresses. The check compared the full address, but the database quietly cut the address short at a special character, so the stored value no longer matched what was checked. This let someone sign up with an address that looked allowed but was not.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.