CVE-2026-116266: MIME::Head versions from 5.518 before 5.521 for Perl decode a partly encoded multipart boundary without flagging the parse as ambiguous
MIME::Head versions from 5.518 before 5.521 for Perl decode a partly encoded multipart boundary without flagging the parse as ambiguous.
The multipartboundary() method decodes RFC 2047 encoded words anywhere in the boundary, but the ambiguity check only fires when the whole value is one encoded word. A boundary such as abc=?us-ascii?Q?def?= is used as abcdef, and ambiguouscontent() returns false.
Encoded words are not allowed in parameters, so other mail readers split the message on the literal value. A remote sender can hide an attachment from a filter that relies on ambiguouscontent() while the recipient's mail client shows it.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
MIME-toolsto a version that resolves this vulnerability.Fixed in 5.521
Event History
Frequently Asked Questions
Which deployments are meaningfully exposed?
Mail-processing systems using affected MIME::Head versions are exposed when a security filter relies on ambiguous_content() to identify ambiguous multipart parsing. The risk is a mismatch where the filter does not see an attachment that a recipient mail client displays.
What does an attacker need to exploit this issue?
An attacker needs to be able to send a crafted multipart email to the target. The crafted boundary uses a partially RFC 2047-encoded value, causing MIME::Head to decode it while other mail readers use the literal boundary value.
How can I determine whether my installation is affected?
Check the installed MIME::Head version. Versions from 5.518 through versions before 5.521 are affected; version 5.521 addresses the issue.