zbateson/mail-mime-parser has uncontrolled resource consumption (CPU/memory DoS) parsing untrusted MIME
High severity. Published 24 September 2026. Update zbateson/mail-mime-parser to the fixed version of your branch (3.0.6, 4.0.2): composer update zbateson/mail-mime-parser.
Which versions are affected?
| Package | Affected versions | Fixed in |
|---|---|---|
| zbateson/mail-mime-parser (opens in a new tab) | >= 2.0.0, < 3.0.6 | >= 4.0.0, < 4.0.2 | 3.0.6, 4.0.2 |
What should you do?
Update every affected package you use to its fixed version, then check that nothing else in your project matches an advisory. To see which version you run, and whether anything is still affected:
composer show zbateson/mail-mime-parser
composer auditAdvisory details
| Severity | HighCVSS 7.5 |
|---|---|
| Published | |
| Updated | |
| CVE | CVE-2026-61816 (opens in a new tab) |
| GHSA | GHSA-f6v3-2qmr-vfjx (opens in a new tab) |
| Weakness | CWE-400 |
What the advisory says
Impact
An uncontrolled resource consumption / algorithmic complexity vulnerability affecting any application that parses untrusted email with this library.
Three independent parsing paths are super-linear in cost, so a byte-size cap on the caller side does not bound the work done. A crafted message under 2 MB can consume seconds of CPU or hundreds of megabytes to multiple gigabytes of memory (leading to an out-of-memory kill), enabling denial of service. The parse is lazy, but the cost is paid on the first getAllParts() or content read.
Details
1. Deep multipart nesting is O(depth²).
Source: GHSA-f6v3-2qmr-vfjx (opens in a new tab) in the GitHub Advisory Database (CC BY 4.0). Data from GitHub (opens in a new tab) as of .
Other recent advisories for this package
- zbateson/mail-mime-parser has CRLF header injection via attachment filename (high, 24 September 2026)