---
id: "CVE-2026-116273"
kind: "vulnerability"
aliases: ["CVE-2026-116273"]
title: "Perl MIME::Parser: no default part limit lets crafted email exhaust memory"
severity: "medium"
cvss: null
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["mail-processing", "package", "perl", "self-hosted"]
not_affected_if: ["explicit-max-parts-limit", "no-untrusted-mime-input", "version-5.521-or-later"]
published_at: "2026-10-28T18:17:13+00:00"
first_seen_at: "2026-10-28T18:34:33+00:00"
updated_at: "2026-10-28T18:35:22+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-116273", "first_seen_at": "2026-10-28T18:34:33+00:00"}]
---

# Perl MIME::Parser: no default part limit lets crafted email exhaust memory

MIME::Parser for Perl before 5.521 has no default cap on how many message parts it parses, because max_parts defaults to -1. A crafted multipart email can make a default-configured parser build an entity for every part until memory runs out.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Run `perl -MMIME::Parser -e 'print $MIME::Parser::VERSION'` or `cpanm --info MIME::Parser` to read the installed version.
- Search your code for `MIME::Parser->new` calls that do not set `max_parts`, since the default is unlimited.

## Fix

- Upgrade MIME::Parser to `5.521` or later, which sets `max_parts` to `1000` and `max_depth` to `64` by default.
- Do not set `max_parts` or `max_depth` to `-1` on parsers that handle untrusted mail.

## Timeline

- 2026-10-28T18:34:33+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-116273

## From the sources

MIME::Parser versions before 5.521 for Perl set no limit on the number of message parts by default, allowing memory exhaustion.

The max_parts option defaulted to -1, which disables the limit, so a parser created with default settings builds an entity for every part however many a message has.

Version 5.521 sets max_parts to 1000 and max_depth to 64 by default. Setting either to -1 still removes the limit.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
