Skip to content
Account takeover Disclosed report Beginner

Security Vulnerability - SMTP protection not used

The domain's SPF record uses a softfail qualifier, which allows attackers to send spoofed emails that appear to come from the domain. An attacker could send a phishing email from a trusted address to steal credentials.

ashishdhaduk Follow

Originally disclosed on HackerOne

  • Triaged in under an hour
  • Fixed in 8 hours
  • Disclosed after 3 months

Hi,

I'm checking your website found SPF record there. You should apply strict SMPT policy to stop spoofed email sending from your domain.

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 Id and password (SESSION COOKIE). The results can be more dangerous.

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

Fix :

Your SPF record is: Found v=spf1 record for veris.in: v=spf1 include:servers.mcsv.net ?all

It should be

Found v=spf1 record for veris.in: v=spf1 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

You can check your SPF here:

http://www.kitterman.com/spf/validate.html

The problem :

The article clearly shows difference between softfail and fail you should be using fail as Softfail 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 ashishdhaduk. 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 SPF record uses a softfail qualifier (~all) instead of a hard fail (-all), which permits spoofed emails to be delivered with only a soft warning.

Impact

An attacker could send spoofed emails from the domain, potentially tricking recipients into clicking malicious links and revealing their credentials.

What the attacker needed

Domain uses SPF with ~all; attacker can send email

The fix

The SPF record should be changed to use a hard fail qualifier (-all) instead of softfail (~all).

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.

SPF is a DNS record that tells email servers which servers are allowed to send email for a domain. A softfail setting means emails from unauthorised servers are marked as suspicious but still delivered, so an attacker can send fake emails that look like they come from the real domain. This report says the record should use a strict fail setting instead.

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 ashishdhaduk

View all

1 more disclosed report, best first.

More from Veris

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.