HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
ronomon
mime
JavaScript2017–2020
ronomon / mime

mime

Fast, robust, standards-compliant MIME decoder. Ships with extensive tests and fuzz tests.

2Distinct people
10Mentions
0Explicit recommenders
63GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Fast, robust, standards-compliant MIME decoder. Ships with extensive tests and fuzz tests.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year10 dated mentions

Observed mentions: 2017-05-22 10:06:06 UTC to 2020-04-22 15:43:28 UTC.

01232017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 3 mentions; 3 submissions, 0 comments20172018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2020

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC330
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC303
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC303
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC101

What Hacker News says

10 sources
I wrote @ronomon/mime (https://github.com/ronomon/mime) as a strict fuzz-tested MIME parser in a memory-safe language to prevent similar attacks such as: 1. Malicious character encodings that can crash email clients such as Apple Mail. 2. Malicious RFC 2231 continuation indices designed to cause overallocation. 3. Base64 data containing illegal characters such as null bytes. 4. Unterminated comments and quoted-strings. 5. Missing multipart parts (e.g. no terminating boundary delimiter). 6. Malicious data designed to cause CPU-intensive decoding or stack overflows (aka MIME bombs, the email equivalent of zip bombs). 7. Malicious multiple occurrences of crucial headers and parameters, which could cause clients to render an email differently from that scanned by antivirus software. 8. Encoded words containing malicious control characters (cf
Read the rest
. Mailsploit). While it won't prevent this exact attack because it seems to be purely size-based, @ronomon/mime was able to detect attacks such as Tim Cotten's "Ghost Emails" Gmail hack [1] as well as recent CVEs reported against ClamAV [2] and SpamAssassin [3], which are variants of a MIME multipart attack I disclosed through Snyk, "How to crash an email server with a single email" [4]. [1] https://blog.cotten.io/ghost-emails-hacking-gmails-ux-to-hid... [2] https://blog.clamav.net/2019/11/clamav-01021-and-01015-patch... [3] http://mail-archives.apache.org/mod_mbox/spamassassin-announ... [4] https://snyk.io/blog/how-to-crash-an-email-server-with-a-sin...
In You’ve Got 0-Click Mail: Unassisted iOS Attacks RCE via Mobilemail/Maild
> some email providers also filter incoming messages and remove malformed MIME components that are needed to reach a vulnerability. I wrote @ronomon/mime [1] for this purpose, to protect downstream user email clients from MIME bombs [2], invalid charsets which can crash Apple Mail, multiple From headers which can exploit Gmail [3], attachment directory traversals, malicious continuation indices, truncated MIME messages, stack overflows etc. [1] https://github.com/ronomon/mime [2] https://snyk.io/blog/how-to-crash-an-email-server-with-a-sin... [3] https://blog.cotten.io/ghost-emails-hacking-gmails-ux-to-hid...
In The Fully Remote Attack Surface of the iPhone
Thanks, one thing we also found is that spammers tend to be poor at RFC standards, in a way that Gmail etc. will have no problem with, but which are obviously broken. For example, we use our own https://github.com/ronomon/mime to detect and reject email which has missing multi-parts (no terminating boundary delimiter). All of this has been spam so far, and we are yet to see a false positive. I don't think SpamAssassin has a rule for this (yet)? Another example is illegal header characters, which are almost always spam, with a handful of false positives (usually machine-generated).
In A Plan for Spam (2002)
I wrote @ronomon/mime, an email parser which enforces RFC 2822 3.6.2 and which also detects a variety of attack vectors before they can reach the email client. A summary of these vectors are listed in the README (amongst various sanity checks): https://github.com/ronomon/mime#robust Just through checking everything about an email carefully, @ronomon/mime has detected and brought to light some interesting attack vectors, for example a malformed email which crashes Apple Mail. This was disclosed to Apple's security team although they did not see any actual security implications. Another interesting attack vector was an email containing millions of empty multiparts, which was able to crash several popular email servers. This was disclosed through Snyk, here are the details: https://snyk.io/blog/how-to-crash-an-email-server-with-a-sin...
In Hacking Gmail’s UX with 'From' Fields – Another Phishing Vector
Since I came across Jeff Dean's tip a few years ago about back-of-the-envelope calculations and latency numbers (http://highscalability.com/blog/2011/1/26/google-pro-tip-use...), I can't count the number of times that sketching out a design's complexity has saved me from implementing designs that can't possibly work, and eventually resulted in designs that are orders of magnitude faster. In fact, it's not just about designs that work, or designs that are fast, but getting into the practice of estimating complexity in terms of hardware numbers also makes for safer code, especially where validating user data is concerned. Just recently even, it kept me back from what might have been a potential denial of service in https://github.com/ronomon/mime, and lead to discovering a vulnerability in several popular email parsers (https://snyk.io/blog
Read the rest
/how-to-crash-an-email-server-with-a-sin...). I think Martin Thompson summarized it well as "Mechanical Sympathy": https://mechanical-sympathy.blogspot.com/2011/07/why-mechani...
In Latency Numbers Every Programmer Should Know
If anyone is interested in general MIME validation, not specifically email addresses, I wrote @ronomon/mime: https://github.com/ronomon/mime The source code has comments from the various RFCs inline. It's not just a question of reading and knowing the RFCs but also of interpreting them and balancing them. The decoder will throw detailed exceptions which are designed to pinpoint where the message went wrong, and which RFCs were broken by the message. It also does just-in-time decoding, and decodes only the properties you access. This is much more efficient if you only need a header or two to reject spam quickly as part of a front line defense. Above all, most of the methods are extensively fuzz-tested against independent reference implementations.
In Validating email addresses: A journey down RFC5321 [video]

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.