BuzzPHP
LightDarkSystem

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?

PackageAffected versionsFixed in
zbateson/mail-mime-parser (opens in a new tab)>= 2.0.0, < 3.0.6 | >= 4.0.0, < 4.0.23.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 audit

Advisory details

SeverityHighCVSS 7.5
Published
Updated
CVECVE-2026-61816 (opens in a new tab)
GHSAGHSA-f6v3-2qmr-vfjx (opens in a new tab)
WeaknessCWE-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

All Composer security advisories