zbateson/mail-mime-parser is vulnerable to Uncontrolled Resource Consumption
75
CVE Score
High
Uncontrolled Resource Consumption
The MIME parser has three super-linear parsing paths: deep multipart nesting is O(depth^2) in MimeParserService::findContentBoundary(), appending many sibling parts is O(n^2) in PartChildrenContainer::add(), and header buffering in HeaderParserService::parse() caps neither header count nor total header size. A crafted message of only a few megabytes can therefore consume seconds of CPU or hundreds of megabytes to gigabytes of memory when parsed, leading to an out-of-memory kill and denial of service. Because the cost is super-linear, a caller-side byte-size cap does not bound the work performed. The fix adds configurable limits on multipart nesting depth and header count/total size and changes sibling append to linear cost.
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.
2.0.0 - 3.0.5
Fixed in 3.0.64.0.0 - 4.0.1
Fixed in 4.0.2zbateson/mail-mime-parser is vulnerable to Uncontrolled Resource Consumption in versions 2.0.0 - 3.0.5 and 4.0.0 - 4.0.1.
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.