Intel

AIKIDO-2026-829376

zbateson/mail-mime-parser is vulnerable to Denial of Service (DoS)

GHSA-fcgh-j754-jh42Published Oct 14, 2026
October 14, 2026

75

CVE Score

High

Denial of Service (DoS)

Are you affected? Scan for Free

TL;DR

Parsing an untrusted email message can make the library consume memory and CPU far out of proportion to the message size. Header count and byte size limits apply only within a single part rather than across the whole message, so a multipart message whose parts each carry a large header retains memory roughly 250 times the message size. A folded quoted header value at the per header token limit costs several seconds of CPU because an internal accumulator is copied on every token instead of appended in place, and matching a part's end boundary compares every candidate line against every ancestor part, so cost grows with nesting depth. The fix adds a shared per message budget for header bytes, header count, and parsed tokens, replaces the per token accumulator copy with a linear append, and tracks live boundary lines once instead of per ancestor.

How do I fix this?

Upgrade the zbateson/mail-mime-parser library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you parse email messages from untrusted senders.

Versions

1.0.0 - 3.0.8

Fixed in 3.0.9

4.0.0 - 4.0.5

Fixed in 4.0.6

Background info

zbateson/mail-mime-parser is vulnerable to Denial of Service (DoS) in versions 1.0.0 - 3.0.8 and 4.0.0 - 4.0.5.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea