# zbateson/mail-mime-parser has uncontrolled resource consumption (CPU/memory DoS) parsing untrusted MIME

High severity, published 2026-09-24. Update zbateson/mail-mime-parser to the fixed version of your branch (3.0.6, 4.0.2): composer update zbateson/mail-mime-parser.

Canonical URL: https://buzzphp.com/security/ghsa-f6v3-2qmr-vfjx · Data from GitHub as of 2026-11-25.

| | |
| --- | --- |
| Severity | high (CVSS 7.5) |
| Published | 2026-09-24 |
| Updated | 2026-09-24 |
| CVE | [CVE-2026-61816](https://nvd.nist.gov/vuln/detail/CVE-2026-61816) |
| GHSA | [GHSA-f6v3-2qmr-vfjx](https://github.com/advisories/GHSA-f6v3-2qmr-vfjx) |
| Weakness | CWE-400 |

| Package | Affected versions | Fixed in |
| --- | --- | --- |
| zbateson/mail-mime-parser | >= 2.0.0, < 3.0.6 or >= 4.0.0, < 4.0.2 | 3.0.6, 4.0.2 |

## What to do

Update zbateson/mail-mime-parser to the fixed version of your branch (3.0.6, 4.0.2): composer update zbateson/mail-mime-parser.

Check which version you run with `composer show zbateson/mail-mime-parser`, and every affected package with `composer audit`.

## About this advisory

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²).

## Links

- [GHSA-f6v3-2qmr-vfjx on GitHub](https://github.com/advisories/GHSA-f6v3-2qmr-vfjx)
- [CVE-2026-61816 on the National Vulnerability Database](https://nvd.nist.gov/vuln/detail/CVE-2026-61816)
- [All Composer security advisories](https://buzzphp.com/security)
