MIME-tools before 5.521 for Perl fixes 10 CVEs
The visible flaws let one bad Content-Type parameter hide later parameters, including a multipart boundary.
Ambiguous multipart boundary parsing in Perl MIME::Head
MIME::Head in Perl (5.518 before 5.521) decodes a partly RFC 2047-encoded multipart boundary and treats it as unambiguous. multipart_boundary() decodes encoded words anywhere in the value, but ambiguous_content() flags ambiguity only when the whole value is one encoded word, so a mixed boundary is used in decoded form. A remote sender can hide an attachment from a filter that trusts that flag while the recipient's mail client, which splits on the literal boundary, still shows it.
What to do: Upgrade MIME::Head (MIME-tools) to 5.521.
| Product | Affected | Fixed in |
|---|---|---|
| Perl MIME::Head | 5.518 before 5.521 | 5.521 |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
MIME::Head versions from 5.518 before 5.521 for Perl decode a partly encoded multipart boundary without flagging the parse as ambiguous. The multipart_boundary() 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 ambiguous_content() 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 ambiguous_content() while the recipient's mail client shows it.
The visible flaws let one bad Content-Type parameter hide later parameters, including a multipart boundary.
Today 1.6K readers · 3.1K views · 2.3K reads · all time 161K views