Kwetsbaarheid · Bron: GitHub Security Advisories · Zekerheid: waarschijnlijk · Gepubliceerd 24 september 2026
zbateson/mail-mime-parser has uncontrolled resource consumption (CPU/memory DoS) parsing untrusted MIME
Geen actie nodig; we volgen dit.
Werk je bij een gemeente? Log in om te zien of dit jouw gemeente raakt. Het oordeel komt dan uit het register van je gemeente.
Deze dreiging heeft een beperkte relevantie voor gemeenten. Een niet-gepatchte installatie van dit product kan worden misbruikt. Reguliere opvolging door ICT-beheer en de ISO volstaat; bestuurlijke betrokkenheid is nu niet nodig.
Betrokken rollen: CISO · ISO · ICT beheer · Leveranciersmanager
### 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²).** `MimeParserService::findContentBoundary()` tests each content line against the current part and every ancestor via the recursive `ParserMimePartProxy::setEndBoundaryFound()`, so a nesting depth of D costs 1 + 2 + … + D comparisons. A ~600 KB message nested ~10,000 deep does not finish parsing in a minute. 2. **Many sibling parts is O(n²).** `PartChildrenContainer::add()` appends each child with `array_splice($children, count($children), 0, [$part])`, which reindexes the entire array on every call. The same container backs UUEncoded `begin` parts via `NonMimeParserService`. 3. **Header buffering is unbounded.** `HeaderParserService::parse()` reads header lines up to a blank line with no limit on header count or total size, so a few megabytes of header lines can hold hundreds of megabytes resident; a ~5 MB message of headers can reach multiple gigabytes and be OOM-killed. ### Proof of concept ```php composer require zbateson/mail-mime-parser parse($raw, false)->getAllParts()); printf("%-22s input=%5.2f MB time=%6.2f s peak=%6.1f MB\n", $label, strlen($raw) / 1048576, microtime(true) - $t, memory_get_peak_usage(true) / 1048576); } measure('nesting depth=2000', nestedMessage(2000)); measure('siblings=50000', siblingMessage(50000)); measure('headers=300000', headerMessage(300000)); ``` Run with a raised memory limit so the header case does not abort early: php -d memory_limit=2048M poc.php // nesting depth=2000 input= 0.13 MB time= 2.08 s peak= 30.0 MB // siblings=50000 input= 1.72 MB time= 5.11 s peak= 276.0 MB // headers=300000 input= 2.29 MB time= 0.40 s peak= 380.3 MB ### Patches Fixed in 4.0.2 and 3.0.6. The fixes add configurable limits on multipart nesting depth and on header count / total header size (recording a parse error past the threshold rather than throwing), and change sibling append to O(n). Users should upgrade to one of these (or later) versions. Versions 2.x are also affected but are end-of-life and will not receive patches; users on those lines should upgrade to a fixed release. (Versions prior to 2.0 used a different parser and are not affected by all three paths.) ### Workarounds These costs are super-linear, so an input byte-size cap alone does not bound them. Until upgrading, restrict exposure of the parser to untrusted input, and run parsing under a constrained memory_limit and execution time limit so a malicious message fails its own request rather than exhausting the host. - Found and reported privately by Ilia Alshanetsky (@iliaal), who also proposed fixes that informed the patches.
CVE-2026-61816
Leveranciers: composer
Exploiteerbaarheid: geen exploit bekend. Blootstelling: niet internet-facing / geen bekende blootstelling. Gemeentelijke relevantie: geen match met de gemeentelijke context. Impact: alleen technische impact. Bronvertrouwen: middel.
Exploiteerbaarheid · Geen exploit bekend
geen exploit bekend
Blootstelling · Laag
niet internet-facing / geen bekende blootstelling
Gemeentelijke relevantie · Geen match
geen match met de gemeentelijke context
Deel geen vertrouwelijke of persoonsgegevens in dit formulier. Beschrijf je melding algemeen; gevoelige details horen niet op een publieke radar thuis.
Impact · Technisch
alleen technische impact
Zekerheid en bronkwaliteit · Middel
beperkt bevestigd
Mitigatie · Laag
geen mitigatie bekend
EPSS-kans · licht verhogend
EPSS schat de kans op misbruik binnen 30 dagen op 1%.
Leveranciersketenimpact · verhogend
De dreiging raakt een leverancier of de toeleveringsketen; gemeenten zijn sterk afhankelijk van externe leveranciers.
Exploit alleen geclaimd · verlagend
Een exploit wordt geclaimd (community/onbevestigd) maar is niet onafhankelijk geverifieerd.
Beperkte zekerheid van het signaal · verlagend
De zekerheid is 'waarschijnlijk'; een onbevestigd signaal verlaagt de urgentie tot het is geverifieerd.
Alleen theoretisch risico · verlagend
Er is (nog) geen misbruik, exploit of EPSS-signaal; het risico is vooralsnog theoretisch, wat de urgentie verlaagt.
Deze dreiging scoort 5/100 voor de gemeentelijke relevantie. Meegewogen: een vooralsnog uitsluitend theoretische kwetsbaarheid en geen leverancier uit de catalogus of gemeentelijke context. Wel meegewogen: een leveranciers- of ketenrisico. Geraakte processen: Leveranciersketen.
Geraakte processen: Leveranciersketen
Geraakte technologie: Containers, Opensource, composer, zbateson/mail-mime-parser
Categorie 'kwetsbaarheid': er is een CVE aan de dreiging gekoppeld. Ernst 'laag' bepaald op basis van: geen ernst-signalen gevonden, standaard 'laag'. Zekerheid 'waarschijnlijk': gerenommeerd securityonderzoek (GitHub Security Advisories). Geen bekende leveranciers of producten herkend.
De prioriteit volgt vaste regels en is na te rekenen; er komt geen AI-inschatting aan te pas. Weeg de aannames mee voor je eigen omgeving.