Email Length Verification
The website did not check the length of an email address during registration, so an attacker could register with an email longer than the database column allowed. The database truncated the address, which let the attacker bypass the allowed email-domain restriction and receive a verification email on a different address.
Originally disclosed on HackerOne
- Disclosed after 8 hours
Hi Team, Hope you are good. I found your website app.legalrobot.com vulnerable to this vulnerability. Bug: Improper authentication - generic Description: Dont know much about the websites that how they stored email address.Email addresses are stored as VARCHAR(128) But here your website legalrobot dont verify the length of an email address upon registration which allowed the attackers to bypass the allowed email-domains defined in auth.email-domains.
How to Exploit: Exploiting this is much Easy Get an email address of 128 characters long. StackOverflow answer indicates that the maximum length of an email address is 254 characters.Then register with your 128 character email address with @allowed-domain.com appended to it. The @allowed-domain.com part will be truncated because MySQL can’t store it, and you will receive a verification email on your 128 character email address.
It will be much easy if you are using gmail if we keep [email protected], you will receive all mails sent to ihusnain49+aaaaaaaaaaa…[email protected].
References: For reference watch this video : https://www.youtube.com/watch?v=o8-0hwaUB4I&feature=youtu.be and you will came to know about the vulnerability of your website. you can also see this report as a reference because this is the same vulnerability as this report is : https://hackerone.com/reports/2224
I reccomended you two open both of the links.
Reference 1: https://www.youtube.com/watch?v=o8-0hwaUB4I&feature=youtu.be
Reference 2 : https://hackerone.com/reports/2224
Proof of concept: I register an account on legalrobot with this email [email protected] and I received the mail on [email protected] because the other part gets truncated.
Screenshots for Proof of concept:
Attaching some screen shots for proof of concept in which you can clearly see.
Thanks Regards: Husnain Iqbal
Attachments



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
Root cause
Likely the email field was stored in a fixed-length database column without length validation, so the database silently truncated the value and the domain check was applied to the truncated string.
Impact
An attacker could bypass the allowed email-domain restriction and register using an email address from a domain that should have been blocked.
What the attacker needed
Access to the registration page; an email address that can receive mail
How it was found
- Create an email address that is 128 characters long and append the allowed domain to it.
- Register on the website using that long email address.
- Receive the verification email at the shortened address because the domain part was truncated.
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.
When you sign up, the site checks that your email ends with an approved domain. Here, the site stored the email in a fixed-size box that cut off anything too long. By making the email very long and putting the approved domain at the end, the cut-off removed that domain, but the site still sent the verification email to the shortened address.
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.