2026-10-28 17:32CVE-2026-116266CPANSec
PUBLISHED5.2CWE-436

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 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.

Problem type

Affected products

< 5.521 - AFFECTED

References

GitHub Security Advisories

GHSA-c5m8-q98x-42wx

MIME::Head versions from 5.518 before 5.521 for Perl decode a partly encoded multipart boundary...

https://github.com/advisories/GHSA-c5m8-q98x-42wx

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.

JSON source

https://cveawg.mitre.org/api/cve/CVE-2026-116266
Click to expand
{
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "cveMetadata": {
    "cveId": "CVE-2026-116266",
    "assignerOrgId": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
    "assignerShortName": "CPANSec",
    "dateUpdated": "2026-10-28T17:32:28.565Z",
    "dateReserved": "2026-10-25T18:05:02.235Z",
    "datePublished": "2026-10-28T17:32:28.565Z",
    "state": "PUBLISHED"
  },
  "containers": {
    "cna": {
      "providerMetadata": {
        "orgId": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
        "shortName": "CPANSec",
        "dateUpdated": "2026-10-28T17:32:28.565Z"
      },
      "title": "MIME::Head versions from 5.518 before 5.521 for Perl decode a partly encoded multipart boundary without flagging the parse as ambiguous",
      "descriptions": [
        {
          "lang": "en",
          "value": "MIME::Head versions from 5.518 before 5.521 for Perl decode a partly encoded multipart boundary without flagging the parse as ambiguous.\n\nThe 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.\n\nEncoded 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."
        }
      ],
      "affected": [
        {
          "collectionURL": "https://cpan.org/modules",
          "packageName": "MIME-tools",
          "modules": [
            "MIME::Head"
          ],
          "programFiles": [
            "lib/MIME/Head.pm",
            "lib/MIME/Field/ParamVal.pm"
          ],
          "programRoutines": [
            {
              "name": "MIME::Head::multipart_boundary"
            },
            {
              "name": "MIME::Field::ParamVal::parse_params"
            }
          ],
          "repo": "https://salsa.debian.org/dskoll/mime-tools",
          "defaultStatus": "unaffected",
          "versions": [
            {
              "version": "5.518",
              "status": "affected",
              "versionType": "custom",
              "lessThan": "5.521"
            }
          ]
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "lang": "en",
              "description": "CWE-436 Interpretation Conflict",
              "cweId": "CWE-436",
              "type": "CWE"
            }
          ]
        }
      ],
      "references": [
        {
          "url": "https://metacpan.org/release/DSKOLL/MIME-tools-5.521/changes",
          "tags": [
            "release-notes"
          ]
        }
      ],
      "solutions": [
        {
          "lang": "en",
          "value": "Upgrade to MIME-tools 5.521 or later."
        }
      ]
    }
  }
}