How to crash an email server with a single email (2018)
snyk.io
snyk.io
A better design would’ve been something passing the limit as a configuration object, something like:
{ attachmentLimit?: number | boolean }For example, one variant of this kind of MIME bomb would be defeated by a limit on the number of RFC 2231 parameter continuations acceptable per header. Even if you were to allow the user to override the default limit as you propose, your library would still need a sane default, because you would probably find that not many people would see RFC 2231 parameter continuations as a threat vector or even think to specify a limit, let alone know what a sane limit would be.
In the end, to be secure, you would have to expose so many limits that just using the library would be a mess.
As soon as you say "that's not for the parser to decide" you run the risk of things falling through the gap and no policy decisions being made at all.
You also have to accept that sometimes the parser designer alone knows best the complexity analysis of the resources the library will need.
Someone in IT was testing an email distribution list for the whole company (CEO announcements, that sort of thing) and sent out a test email to the effect of “Hello, did this work?”.
Two problems.
1. They had emailed the whole company for real, not the test list they thought they emailed
2. The list was setup such that anyone in the company could email it and also send a message to all other employees in the bank.
Within about 5 minutes everyone in the bank had hundreds of emails turning up. Initially this was people saying “Yes I got it”. Before long people were emailing to say “Please stop sending all these emails” which in turn got sent to the whole company.
Of course some people then started replying all to tell people to stop replying which only added fuel to the fire. The exponential traffic growth effectively brought the email system to halt for many hours until the mess could be cleaned up.
I had similar issues back at an large company, some users replying 1k people sharing an unique link to an internal questionnaire because someone before them replied the original email asking for the link.
That and permissions, never let something like this be accessed by end users.
I cannot think of cases where that is the right thing to do. If you want to host a discussion with thousands of people in real life, you let people send in questions beforehand, manually filter and group them, then hold a panel discussion between a selected representative group (or something similar)
Discussions over email are harder to do than face-to-face ones, so, at the least, that’s what you should do with email to.
If, on the other hand, you want to inform thousands of people, using BCC is fine.
If you want to make sure everybody knows that a message is sent to thousands, start the email with “this message was sent to everybody in the foo, bar, and baz departments” or something similar.
https://blog.clamav.net/2019/11/clamav-01021-and-01015-patch...
http://mail-archives.apache.org/mod_mbox/spamassassin-announ...
I always think of quotes like this when I hear people claim that garbage collection is a solved problem.
The real problem here is that where a streaming parse is called for, a parser that fully manifests all the objects in RAM was used. Streaming parsers remain relatively rare.
(It's actually a legit advantage of the XML library infrastructure; they're readily available there, though typically you'll be using them directly because the libraries that build further layers of abstraction on parsing often concretely manifest everything in RAM anyhow....)
And this is about new nodejs libraries that aren't even mature yet. I'm talking about actual mail services based on Postfix and Exim.
Last time I migrated a Sendmail setup to Postfix back in 2013 they actually shutdown port 25 when receiving too many connections. That's funny. An MTA shutting down its main port because it can't handle the connections, while postfix replacing it can handle it just fine.
> There isn’t anything to compare. We couldn’t figure out how to compare these references, do they point to valid commits?
It's because HN parsed the right angle bracket as part of the URL, so Github is looking for the branch/tag "v2.3.0>", which doesn't exist.
Same issue with your other link. snyk.io returns:
> Invalid vulnerability. This vulnerability does not exist.
The correct links are:
https://github.com/nodemailer/mailparser/compare/v2.2.0..v2....
and
This would have been in early 2000's, when all the major AV products - particularly those doing mail gateway scanning, were vulnerable to them. At first it was a zip attachment, expanding to several GBs. That got patched. Then it was bzip2. That got patched. By the fourth iteration, the companies finally caught up with what was being done and took active countermeasures in their software to protect themselves.
One of the first ones I remember was to limit the unpack memory and if the attachment was getting allocated too much, give up. If I recall correctly, it took a couple of weeks before malware authors came up with the idea of padding their executable payloads with a few tens of megs of leading NOPs...
Coincidentally, https://github.com/ronomon/zip can catch David Fifield's zip bomb.
By submitting this form you consent to us emailing you occasionally about our products and services.