Skip to content
Subdomain takeover Disclosed report Beginner

Mailgun misconfiguration

A subdomain of wakatime.com was pointed via CNAME to Mailgun but was not claimed in Mailgun, allowing the reporter to claim it in their own Mailgun account. This could let an attacker receive or snoop on emails sent to that subdomain.

Gaurang Bhatnagar Follow

Originally disclosed on HackerOne

  • Fixed in 13 hours
  • Disclosed after 2 days

During subdomain enumeration i found the following subdomain:

email.mailgun.wakatime.com

Looking at the cname records, it is pointing to mailgun.

host email.mailgun.wakatime.com
email.mailgun.wakatime.com is an alias for mailgun.org.
mailgun.org has address 34.225.110.231
mailgun.org has address 34.194.118.46
mailgun.org is an alias for mailgun.org.
mailgun.org has address 34.194.118.46
mailgun.org mail is handled by 10 mxb.mailgun.org.
mailgun.org mail is handled by 10 mxa.mailgun.org.

I went to my mailgun account and tried to claim email.mailgun.wakatime.com. And success!

Screen_Shot_2017-06-29_at_11.00.04_PM.png
Screen_Shot_2017-06-29_at_11.00.04_PM.png From the original on HackerOne

And i can now also create a mailing list.

Screen_Shot_2017-06-29_at_11.06.49_PM.png
Screen_Shot_2017-06-29_at_11.06.49_PM.png From the original on HackerOne

It seems you have not added email.mailgun.wakatime.com to your mailgun account.

Hence, it could be possible to snoop into the emails of wakatime.

I guess we need to add the dns records to verify the domain and it may take upto 48 hours for DNS changes to propagate Hence, i have not gone further and decided to report this.

The original report as published on HackerOne, by hax0rgb. 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 subdomain's DNS record delegated mail handling to Mailgun, but the domain was never verified or claimed in the organisation's Mailgun account, leaving it open for anyone to claim.

Impact

An attacker could potentially receive or snoop on emails sent to that subdomain, though the reporter did not complete DNS verification and stopped before confirming full control.

What the attacker needed

A free Mailgun account; the subdomain is unclaimed in Mailgun

The fix

The subdomain should be added and verified in the organisation's Mailgun account.

How it was found

  1. Find the subdomain during enumeration.
  2. Check its CNAME record and see it points to Mailgun.
  3. Try to claim the subdomain in a personal Mailgun account.
  4. Observe that the claim succeeds and a mailing list can be created.

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.

Mailgun is a service that sends and receives email for domains. If a company points a subdomain at Mailgun but never registers that subdomain in its own Mailgun account, anyone else can register it and start receiving the email meant for the company.

What is Subdomain takeover?

A company's DNS still points at a cloud service it no longer uses, so anyone can claim it and serve content on the company's domain.

More by Gaurang Bhatnagar

View all

2 more disclosed reports, best first.

More from WakaTime

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Subdomain takeover

The lesson behind this report.

A company's DNS still points at a cloud service it no longer uses, so anyone can claim it and serve content on the company's domain.