Skip to content
CSRF Disclosed report Beginner

CSRF allows to test email forwarding

The endpoint that tests email forwarding did not check the CSRF token, so a page on another site could make a logged-in user's browser send forwarding test emails. An attacker could use this to confirm which forwarding addresses a victim had configured.

muon4 Follow

Originally disclosed on HackerOne

  • Triaged in 14 hours
  • Fixed in 51 days
  • Disclosed after 51 days

Summary:

It is possible to send email forwarding emails in the name of victim. The main problem is that you don't verify the X-CSRF-Token in the endpoint /security_email_forwarding/test_forwarding.json?id=$id.

Steps To Reproduce:

  • Login as an program user who has access to the Email Forwarding
  • Navigate to the https://hackerone.com/hackerone_h1p_bbp3/security_email_forwarding and add new email here (use e.g. wearehackerone.com address)
  • This will most likely fail. Atleast in our tests this used to happen
  • Make the following HTML file:
<script>
for (i = 300; i < 350; i++){
var url = "https://hackerone.com/$program-id/security_email_forwarding/test_forwarding.json?id="+i;
var CSRF = new XMLHttpRequest();
CSRF.open("GET", url, true);
CSRF.withCredentials = 'true';
CSRF.send();
}
</script>

Note: set your forwarding id to be in this loop for (i = 300; i < 350; i++){ (the purpose of this for loop is just to show that an attacker could verify all these emails). Also, set your program name to as a value of $program-id.

  • Open this email to the new tab of the current browser
  • The email forwarding test messages will be sent

Recommendation:

Verify that X-CSRF-Token which is already part of original HTTP request.

References:

https://owasp.org/www-community/attacks/csrf

Impact

CSRF allow to send email forward test messages

The original report as published on HackerOne, by muon4. 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 test-forwarding endpoint accepted state-changing GET requests without validating the X-CSRF-Token that the normal request includes.

Impact

An attacker could make a logged-in victim's browser send email forwarding test messages, which may let the attacker verify which forwarding addresses the victim has set up.

What the attacker needed

Victim logged in with forwarding access; victim visits attacker's page

How it was found

  1. Log in as a user with access to Email Forwarding.
  2. Open the security email forwarding settings page and add a new forwarding address.
  3. Create an HTML page that loops over forwarding IDs and sends credentialed requests to the test-forwarding endpoint.
  4. Open that HTML page in another tab of the same browser.
  5. The forwarding test messages are sent for the targeted IDs.

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 in to a site, your browser automatically sends your session cookie with requests to that site. A cross-site request forgery (CSRF) attack is a page on another site that quietly makes your browser send such a request for you. Here the request that tests an email forwarding address did not require a secret token, so another site could trigger it without the user knowing.

What is CSRF?

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

More by muon4

View all

10 more disclosed reports, best first.

More from HackerOne

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.