Skip to content
Account takeover Disclosed report Beginner

SMTP protection not used (please read carefully )

The domain's SPF record used a soft-fail qualifier, which tells receiving mail servers to accept spoofed messages but mark them, rather than reject them. An attacker could therefore send email that appears to come from the company's support address and use it to phish users for their credentials.

ashesh Follow

Originally disclosed on HackerOne

  • Disclosed after 4 months

Details: Companies like Coinbase, Yahoo,Google,Facebook and even hackerone implemented a strict email security policy (combining SPF, DKIM, and DMARC) but I don't see taht from mailgreenhouse.ioru , You should apply strict SMPT policy to stop spoofed email sending from your domain. POC is attached.

Exploit scenario:

An attacker would send a Fake email from [email protected] saying that Please change your password, The victim is aware of phishing attacks, But when he sees that the mail originated from [email protected] , He has no other way than to believe it. Clicking on the link takes him to a website where certain JavaScript is executed which steals his greenhouse.io id and password (SESSION COOKIE). The results can be more dangerous.

Code to Exploit:

<?php
$to = "[email protected]";
$subject = "Password Change";
$txt = "Change your password by visiting here - [VIRUS LINK HERE]l";
$headers = "From: [email protected]";
mail($to,$subject,$txt,$headers);
?>

You should do the fix (see the fix below) To prevent misunderstanding and to protect your users. FIX

Your SPF record is dig +short greenhouse.io txt "v=spf1 include:sendgrid.net include:spf.recurly.com include:mailgun.org include:servers.mcsv.net ~all

It should be dig +short greenhouse.io txt "v=spf1 include:sendgrid.net include:spf.recurly.com include:mailgun.org include:servers.mcsv.net -all

I strongly recommend you to read this article :

https://www.digitalocean.com/community/tutorials/how-to-use-an-spf-record-to-prevent-spoofing-improve-e-mail-reliability

The problem The article clearly shows difference between softmail and fail you should be using fail as Softmail allows anyone to send spoofed emails from your domains. in your SPF record you should replace ~ with - at last before all , - is strict which prevents all spoofed emails except if you are sending. Your bug is that you are using~ , you should use -

The original report as published on HackerOne, by ashesh. 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 SPF record ended with a soft-fail (~all) qualifier instead of a hard-fail (-all) qualifier, so unauthorised senders were not rejected.

Impact

An attacker could send spoofed email from the company's support address to phish users for their session cookies and passwords; the text does not show that any receiving server actually accepted such mail.

What the attacker needed

Ability to send email; victim trusts the spoofed sender

The fix

The SPF record should be changed to end with a hard-fail qualifier so that mail from unauthorised servers is rejected.

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.

Email senders publish a list, called an SPF record, that says which servers are allowed to send mail for their domain. The last part of that list tells receiving mail servers what to do with mail from anywhere else: a tilde means 'accept it but flag it', while a minus means 'reject it'. Here the weaker tilde setting was used, so a forged sender address could still reach inboxes.

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 ashesh

View all

19 more disclosed reports, best first.

More from Greenhouse.io

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.