Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Mailgun Security Incident and Important Customer Information (mailgun.com)
187 points by _kcn8 on Jan 5, 2018 | hide | past | favorite | 59 comments


When I get spam email, I usually check the headers and if it's coming from a reputable service (Postmark, Sendgrid, etc.) they usually have a web form or an abuse@ email to send the headers to so that they can shut down the account.

Months ago I received spam from a Mailgun server and tried to use their web form[1] to report it, but it was broken. I reported both that bug and the spam email to their support, which acknowledged it. Weeks later I got another spam email from that same domain, popped open that report form and it was still broken (FWIW as of today it seems to be working again). So I followed up on my initial support request with that info but got no response. Just a few days ago I received another spam message from that domain.

I personally consider all that a very bad sign in an email service provider and wouldn't use Mailgun myself. In contrast, I've been very happy with Postmark.

[1]: https://www.mailgun.com/receiving-spam-from-mailgun


Postmark is really nice indeed, even though a bit on the pricey side.

Still, I can recommend their free tool to monitor DMARC: https://dmarc.postmarkapp.com/


> I've been very happy with Postmark.

Postmark's service is great but their new min $10/month pricing scheme is a retrograde step and penalises small companies sending less than 1000 emails a month.

Deeply unhappy with the change, and wish more companies would follow the Amazon AWS pricing model.


I didn't realize the new monthly plans were required for new accounts - that's unfortunate. I'm still on the old credits system (grandfathered I guess).


Postmark costs money, Mailgun does not.


Postmark is free up to 100 mails / month. But mail deliverability issues are a hell that I'm happy to pay a small fee to avoid.


Do they have an overage charge for the free 100/month, like the 1.25/1000 they list for their non-free use? So you could be free most of the time with the occasional 1.25 charge if you have a busy month?


Unfortunately I don't think so. :(

> We offer a Free Trial plan for testing purposes only. The Trial is limited to 100 emails a month with no overages allowed.

https://postmarkapp.com/support/article/1107-how-does-monthl...


The free tier of Mailgun has significant delivery problems because those servers have a poor spam reputation.


This was used to steal bitcoin cash tips on Reddit by hijacking password reset emails (https://www.reddit.com/r/bugs/comments/7obxkb/mailgun_securi...)

I find it amusing they still have a "trusted by Reddit" blurb on their homepage after this!


I don't believe this would even be an issue if they offered the option to not log sensitive data. I had requested that they provide something like this and someone quite senior reached out to me. He was very polite and professional. He explained that they had to keep this data for operational and compliance reasons and that all email providers are required to. However, that didn't resolve my security concern.

We ended up going with Mandrill which does offer the option to not log sensitive data ^1. Whether they log it somewhere else for the compliance reasons that Mailgun mentioned isn't mentioned anywhere in their docs or privacy policy, but doesn't seem to be accessible from everything I could find. You should never log or allow others to log password reset urls or other sensitive details.

1: See documentation here: https://mandrillapp.com/api/docs/messages.JSON.html#method-s... and search view_content_link


This needs to be the #1 comment in the thread. If you use a transactional mailer, make sure you are not archiving emails with security-sensitive content.

That includes resets, username reminders, signin notifications, etc.

Also secure access to your transactional mailer account with 2FA and restrict access to those who need to be there (i.e. not your entire support team).


More and more "compliance" is an IT industry excuse for "because we want to."


Honest question, why would you "want to" adhere to compliance? It's almost always more work and more cost, I think.


The cost of paying fines for non compliance would be more.


Exactly, that's very different from "because we want to," it's, "because there's a very big stick over our heads if we don't."

I just thought the attitude/assertion was in discord with my own experience/understanding.


Can you explain this a bit more, please? I am confused. How does ‘view_content_link’ cause a security problem?


It's the opposite. That is a link to the section of the Mandrill docs, not the Mailgun docs. The view_content_link option fixes the security problem. (In theory, anyway).


Right. I understand that having that option lets you mitigate some problem. Can anyone expand on what this option does and how it mitigates the problem? Did I miss something from the blog post?


Sure -- AFAIK the problem was that Mailchimp was hacked, and the hacker was able to see and intercept the password reset links being sent to the customer by looking at Mailchimp log data. This option indicates that links should not be stored in log data, so even if an attacker has compromised your Mandrill account, they should be unable to see the exact reset links that are being sent.

edit: worth noting that there are obviously other ways a hacked Mandrill/Mailchimp account could be abused. This just shuts down one of the major abuses you could perform.


Mailgun, not Mailchimp.

Those are two entirely separate companies (unlike Mandrill and Mailchimp which is the same company.)


Thanks. I did indeed miss critical parts of the post. I will review again.


On 12/31, Reddit received several reports regarding password reset emails that were initiated and completed without the account owners’ requests.

We have been working to investigate the issue and coordinating with Mailgun, a third-party vendor we’ve been using to send some of our account emails including password reset emails. A malicious actor targeted Mailgun and gained access to Reddit’s password reset emails. The nature of the exploit meant that an unauthorized person was able to access the contents of the reset email. This individual did not have access to either Reddit’s systems or to a redditor’s email account.

As an immediate precautionary measure, we moved reset emails to an in-house mail server soon after we determined reset links were indeed being clicked without access to the user's email, and before Mailgun had confirmed to us that they were vulnerable. We know this is frustrating as a user, and we have put additional controls in place to help make sure it doesn’t happen again.

We are continuing to work with Mailgun to make sure we have identified all impacted accounts. At this time, the overall number of confirmed impacted users is less than twenty. For those affected, we have resolved the issue and assisted in account recovery.

Additional information about Mailgun’s security incident can be found on its blog here. We’re committed to keeping your Reddit account safe and will continue to monitor this situation carefully. u/sodypop, u/KeyserSosa, and I will be sitting around in the comments for any general questions.


Carefully filed in an almost unread subreddit rather than in /r/announcements where it would be seen by everyone.


This is a new class of attack. Instead of spear-phishing, it's spear-hacking.

It looks like the target was "bitcoin-ish tipped into /u/someredditor" and the hack/vuln was "intercept mail password resets in order to auth account in order to snatch crypto-currency"

ie: most people's reddit accounts (IMHO) are on the "not that important" on the scale of password protection. (Personal Email/Financial => Work => Medium Security [facebook, amazon, etc] => Low Security [discussion forums])

It's another way of saying that I would expect phpBB or reddit or pinterest to have lower password/server security than my gmail or bank websites.

However, because reddit is relatively high profile, and there was mixing of "cash and reddit", all of a sudden not just reddit was target of a hacking attack, but also reddit's 3rd party service providers.

I can choose to use reddit or not, but I can't choose that reddit uses or doesn't use some other random service provider that may or may not be vulnerable.


"I can choose to use reddit or not, but I can't choose that reddit uses or doesn't use some other random service provider that may or may not be vulnerable." Which is similar to the same problem we all face of 'I can choose to work for company x' but I cant choose that they farm out background checks, HR, payroll, benefits etc. to random companies that may or may not be secure.


Never would have occurred to me that this could be used to intercept password reset emails. Very scary.


At least it leaves a trail..

Many services state in the password reset emails that "if this was not initiated by you, ignore it", but it really should be the exact opposite - click the link below to report it!


My guess is they don't do this because somebody decided it would confuse users to have more than one link.


And it also goes against the standard advice of never clicking on anything in an email.


I've always been impressed that Gandi (domain registrar) let you disable password resets by email in your account preferences.


Why would employees need access to client API keys, as opposed to just client ID?

Furthermore, this seems to indicate that the API keys are not hashed. I would expect some bits of the API key to work as an identifier and the rest of the bits treated as secret material (properly hashed).

As a Mailgun customer, this is concerning..


As a former Rackspace employee, I had access to every customer secret IN PLAIN TEXT through multiple web-based systems with a click of a button (IE: business as usual).


Thanks for confirming this. I had my suspicions, especially after the last few years of using them and just seeing massive problems that seemed to be caused by the software at Rackspace.


Agreed. Super disappointed by this (cleartext details and the breach). Will be looking to move all services from Mailgun shortly.


Er, can we expect more information to follow?

1. How was the employee's account accessed? No 2FA?

2. Do employees ordinarily have access to customer secrets (e.g. API keys) or was there some further exploit?

3. The advice in OP for affected customers is to roll keys and SMTP logins. Couldn't/shouldn't you do that for them? Surely security should trump up-time/deliverability?


For 3. I'd say no way. There's no way for Mailgun to know what services are doing with those keys, how important those services are to their customers, how difficult it is for the service owners to rotate their keys, and how much bandwidth they have to do that right now.

In an ideal world, every customer would have a good setup where they can rotate third-party supplier API keys painlessly and have plenty of bandwidth to handle security emergencies. Alas, there's a lot of bad setups out there, and some of them are critical to their customers' operations.

Nothing I've personally worked with had a setup bad enough to make that painful, but I'd be very worried about how reckless a service is to rotate API keys that aren't being actively exploited to do something dangerous without getting a positive confirmation from the customer.


All Rackspace employees are issued hardware or software RSA tokens and a VPN client.

I seriously suspect this was the job of an insider, not a compromised employee laptop.


MailGun has been spun out of Rackspace almost a year ago.


Does this only affect Mailgun's customers? If these customers hold data of third-party – let's call them "end-users" – in Mailgun accounts, Mailgun could/should communicate the total number of individuals affected. "1% of our customers/users" can affect millions of individuals.


In those security disclosures, I often read what I see as contradictory language.

For example, I'm confused by this kind of statement:

> Mailgun has now completed its diagnostic of accounts that were affected and has notified each of the affected users. At this time, we believe less than 1% of our customer base was potentially affected. If you were not directly notified by Mailgun regarding this incident, then your account was not affected.

If you believe that less than 1% of users were affected, it means you don't know for sure how many accounts were affected.

From there, how can you state that "If you were not directly notified by Mailgun regarding this incident, then your account was not affected"?

Doesn't this last statement mean you know for sure my account was not affected? Isn't it in direct contradiction with the previous statement?


Foremost, it was written by a human and unintended language contradictions are common. With that said, what you're suggesting isn't necessarily true -- the language can also indicate potential false positives, again because of the nuances of language.


> unintended language contradictions are common

Yes, definitely true. Although some contexts, like a security disclosure, might warrant a very carefully non-contradictory worded statement that leaves no doubts of interpretation.

> the language can also indicate potential false positives, again because of the nuances of language.

Yes, but in this context, false-positive aren't important to the audience of the disclosure. Nobody really cares if their account was "identified as affected, but in the end wasn't".

If you announce that 1% of your user base was affected, and it turns out that 50% of this 1% were false-positive, great! You were still right in announcing that 1% of your user base was affected. You can always correct this later and announce that things panned out better and only 0.5% of your users were impacted.


These sorts of articles always remind me of “We take security seriously”, otherwise known as “We didn’t take it seriously enough”: https://www.troyhunt.com/we-take-security-seriously-otherwis...


No 2FA on staff accounts?


I like Mailgun so much because of its simplicity but last November 2017 the default postmaster account of one of our domain in Mailgun was hacked. (I don't know where it was hacked but i suspect it was on the Mailgun server because I kept the secret key in my server very well). We moved to Sendgrid because my account in Mailgun got a very bad reputation. One of the hacked smtp credentials was used to send spam.


> At this time, we believe less than 1% of our customer base was potentially affected. If you were not directly notified by Mailgun regarding this incident, then your account was not affected.


> Finally, we’d like to assure our customers and partners that we take security at Mailgun very seriously.

So very seriously that they don't even use https for their blog...


Former mailgun customer. Asked them to delete my personal data a couple of weeks ago (I was not able to do it myself... ) because I would rather they don't leak it in a security hiccup. They kindly refused to do so (as I don't believe any tech support can be that incompetent) and kept spamming my inbox instead. While the severity of this incident is not clear, never imagined curses can act on such a short notice.


This is because Mailgun is in the practice of spam. The number of spam campaigns I've seen with Mailgun as the conduit is high, second only to Mailchimp.


To be fair, Mailgun is in the practice of sending email. It just happens to be that email is one of the main conduits of spam.


No, that's just correlation. Email can be spam, but not all email is spam.


Hi there,

This is Chris from the Mailgun team. I'm sorry that this happened, this shouldn't have been the case. I'd be happy to help rectify this issue, would you be able to send an email to help@mailgun.com with details so I can review?


Come on, Mailgun.

Let's Encrypt is free and takes less than 5 minutes to set up (using certbot).


Yea, I've been able to forget how painful getting SSL setup and configured used to be since letsencrypt + certbot came along.

Automating that crap in ansible is almost too easy.


Wow, the certificate isn't even valid...


Well, it's for the wrong domain. Because they don't use SSL on their blog.


2FA, 2FA, 2FA!


Only 1%? My eye. This has smell of Yahoo to it. I bet within 6 months, this goes up toward 10%. I bet they lost their entire data.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: