zbateson/mail-mime-parser is vulnerable to Denial of Service (DoS)
75
CVE Score
High
Denial of Service (DoS)
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.
Upgrade the zbateson/mail-mime-parser library to the patch version.
You are affected if you are using a version that falls within the vulnerable range and you parse email messages from untrusted senders.
1.0.0 - 3.0.8
Fixed in 3.0.94.0.0 - 4.0.5
Fixed in 4.0.6zbateson/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.
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.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.