Skip to content
Account takeover Disclosed report Beginner

Authentication errors in server side validaton of E-MAIL

The email-adding endpoint accepted addresses that the client-side form rejected, because validation only happened in the browser. An attacker could save malformed addresses containing HTML markup and addresses of arbitrary length.

faisalahmed Follow

Originally disclosed on HackerOne

Informational View original
  • Disclosed after 4 days

To be honest, I'm not sure if there is any real security implications of this bug, but it's something which should be fixed at some point (since it'll be pretty easy). I'm going to describe the issue with reproducible steps:

  1. Navigate to Gratipay Settings Page. https://gratipay.com/~username/settings/
  2. Try adding an invalid e-mail address. ex: [email protected]'.
  3. You won't be able to, as it says "please add an e-mail address. means you're only allowed to add a valid e-mail address.

Now this can be bypassed by intercepting request. Let me show you how.

  • Add a valid email address in e-mail field. ex:[email protected]
  • Run any Request Repeater (ex: BURP Repeater, Live HTTP Header, Temper Data)
  • Click Add E-Mail Address and intercept the request.
  • Go to your repeater and you'll find there this form contents,

POST https://gratipay.com/~lolzsec007/emails/modify.json Post Content:

action=add-email&address=mymail%40gmail.com
  • Change email address from mymail%40gmail.com to mymail%40gmail.com"><h1>
  • Reply/Repeat your request.
  • The Invalid Email address will get saved.

So that means, there is no server side validation for adding e-mail addresses. Now in this point, i would like to talked about another issue that i noticed because of this process, I discovered there is simply character limit for email addresses, as there is no server side validation implemented, an attacker can add an email address with as much characters he wants. but as per RFC, an email address that has more than 255 characters, shouldn't be allowed.

Possible Fix:

  • Implementation of server side validation for email address should resolve both issues.

Looking forward. Thanks

The original report as published on HackerOne, by faisalahmed. 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 application relied only on client-side validation and never re-checked the email address on the server before saving it.

Impact

Malformed and over-long email addresses could be stored; the author is unsure of any real security impact.

What the attacker needed

A free account; ability to intercept HTTP requests

The fix

The report recommends adding server-side validation of email addresses, which should address both the malformed-address and length issues.

How it was found

  1. Open the account settings page.
  2. Try to add an invalid email address and note the browser refuses it.
  3. Enter a valid address and submit while intercepting the request.
  4. In the intercepted request, replace the address with a malformed one containing markup.
  5. Replay the request and observe the invalid address is saved.

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 check input in two places: in your browser (client side) and on its own server (server side). Here the browser refused a bad email address, but the server accepted whatever was sent to it directly, so anyone using a tool to edit the request could store junk or markup in the email field.

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.

More by faisalahmed

View all

16 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.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.