Skip to content
CSRF Disclosed report Beginner

No CSRF Protection in Resend Confirmation Email feature leads to Sending Unwanted Email in Victim's Inbox without knowing Victim's email address

The resend confirmation email endpoint lacked CSRF protection and did not require a JSON content type, so an attacker could make a victim's browser send the request automatically. This caused the victim to receive unwanted confirmation emails without their knowledge.

Binit Ghimire Follow

Originally disclosed on HackerOne

Medium 6.3 View original
  • Triaged in 3 days
  • Fixed in 2 months
  • Disclosed after 9 months

Summary by the researcher

There was no CSRF protection in the feature used for resending confirmation email in Stripo, due to which an attacker could trick the victim to receive an account confirmation email unknowingly.

The report

Summary:

There's no CSRF protection in confirmation email resending feature as a result of which an attacker can trick the victim to receive a confirmation email unknowingly. In other features of the website, the content-type must be "application/json", and there is same-origin policy, which prevents CSRF, but in this one, it isn't necessary to have the content-type "application/json", as a result of which the "resendEmailConfirmation" endpoint becomes vulnerable to CSRF.

Steps To Reproduce:

Step 1. Login to your unverified Stripo account, and then intercept the request made while clicking on the "Resend it" text at the top-right corner of the webpage. The HTTP Request would look like this: Request URL: https://my.stripo.email/cabinet/stripeapi/v1/resendEmailConfirmation Request Method: POST Request Data: {} Step 2. With the obtained information, create a HTML code like this:

<body onload="document.form.submit()">
<form name="form" method="POST" action="https://my.stripo.email/cabinet/stripeapi/v1/resendEmailConfirmation">
</form>
</body>

Step 3. Save the file with .html extension, upload it to your website, and send the URL to the victim. When the victim visits the URL, the request is made automatically from victim's account

Example URL: https://binitghimire.com.np/stripo/resendEmail.html

This is how this vulnerability can be reproduced.

Remediation Actions

In accordance with the current situation of the website, the vulnerability can be fixed by making the "application/json" content-type compulsory in requests, and optionally passing certain data in the HTTP request so that the reproduction would be impossible, unless the enctype="application/json" feature is introduced in higher versions of HTML, and other things would be handled by the existing Same-origin Policy just like in the other features of the website. If the Same-origin Policy hadn't existed, an attacker would have been able to, for example, put any image as someone's profile photo or delete anyone's profile photo, but this doesn't exist, all thanks to the SOP and the content-type "application/json" necessity.

Another way to fix the vulnerability is to introduce the CSRF token system, if you are thinking about bringing a change to the Stripo platform.

Supporting Material/References:

  • An image has been attached along with this vulnerability report.

Impact

As a result of this vulnerability, an attacker would be able to lead the victim in receiving confirmation email without even knowing and without clicking any buttons or filling up any details.

I would be looking forward to hearing from you soon.

Thanks, @binit

Attachments

Result_of_CSRF.png
Result_of_CSRF.png From the original on HackerOne

The original report as published on HackerOne, by whoisbinit. 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

The resendEmailConfirmation endpoint accepted POST requests without a CSRF token and without enforcing the application/json content type, so a cross-site form submission was treated as a valid request.

Impact

An attacker could cause a victim to receive confirmation emails without the victim knowing or taking any action.

What the attacker needed

Victim is logged in to the site; victim visits attacker-controlled page; attacker has a hosting location for the HTML

The fix

The endpoint should require the application/json content type and/or a CSRF token so that cross-site form submissions are rejected.

How it was found

  1. Log in to an unverified account and intercept the request sent when clicking the resend link.
  2. Note the endpoint URL, POST method and empty request body.
  3. Create an HTML page with an auto-submitting form that posts to that endpoint.
  4. Host the HTML file and send its URL to the victim.
  5. When the victim visits the page, the request is sent from their account.

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 are logged into a website, your browser automatically sends your session cookie with requests to that site. A cross-site request forgery (CSRF) attack tricks your browser into sending a request the site trusts, because it comes with your cookie. Here, a simple auto-submitting form on another site could trigger the resend-confirmation-email action on the victim's account.

What is CSRF?

Another site makes a signed-in user's browser perform an action they did not intend.

More by Binit Ghimire

View all

7 more disclosed reports, best first.

More from Stripo Inc

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.