Skip to content
Business logic Disclosed report Beginner

prevent null bytes in email field

The email address field on the user's email settings page accepted invalid characters such as null bytes and other special characters, and the server-side validation did not reject them. An attacker could add malformed email addresses to an account, which the text says is not expected behaviour.

thezawad Follow

Originally disclosed on HackerOne

Informational View original
  • Triaged in under an hour
  • Disclosed after 13 hours

Hi, Zawad here.

Description I recently visited gratipay.com and logged in. I found that invalid characters ( eg. null bytes ) were accepted in email field, which is obviously not an expected behavior.

Steps to Reproduce

  1. Go to https://gratipay.com/~username/emails/
  2. Enter [email protected]\0 or [email protected]%00 or [email protected]$
  3. Now Inspect Element the field and change field type to text from email
  4. Click on Add email address.

You'll see an error message Looks like you've found a bug! Sorry for the inconvenience, we'll get it fixed ASAP! Now reload the page and you'll see the email listed.

It means server side validation of email is not okay. Validation should be improved.

For your reference, #3227 and #3991 are same kind of bug which were resolved.


Zawad

The original report as published on HackerOne, by thezawad. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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 server-side email validation was too weak or missing, so malformed values were stored even though the browser's email field would normally reject them.

Impact

An attacker could store malformed email addresses on an account, which may cause errors or unexpected behaviour, though the text does not show a concrete attack beyond that.

What the attacker needed

A logged-in account

The fix

The server-side email validation should be improved to reject null bytes and other invalid characters.

How it was found

  1. Open the user's email settings page on the site.
  2. Enter an email address containing a null byte or another invalid character.
  3. Use the browser inspector to change the field type from email to text.
  4. Submit the form to add the email address.
  5. Observe the error message, then reload the page and see the email listed.

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 should check the data you send it, not just what the browser shows. Here the email form let through characters that are not allowed in an email address, and the server saved them anyway. The reporter says the server-side check needs to be stronger.

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.

More by thezawad

View all

3 more disclosed reports, best first.

More from Gratipay

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.