2026-10-28 17:33CVE-2026-116268CPANSec
PUBLISHED5.2CWE-1333

MIME::Field::ParamVal versions before 5.521 for Perl allow CPU exhaustion via unclosed comments in header parameters

MIME::Field::ParamVal versions before 5.521 for Perl allow CPU exhaustion via unclosed comments in header parameters.

The comment pattern used to parse Content-Type and Content-Disposition parameters scans from each "(" to the next ")". In a field with no ")", every "(" scans to the end of the header and fails, so parsing takes time quadratic in the header length. The field is parsed again on each attribute lookup, several times per MIME entity.

A 40 KB header takes about 7 seconds to parse once.

Problem type

Affected products

< 5.521 - AFFECTED

References

GitHub Security Advisories

GHSA-cgxv-575f-wxjm

MIME::Field::ParamVal versions before 5.521 for Perl allow CPU exhaustion via unclosed comments...

https://github.com/advisories/GHSA-cgxv-575f-wxjm

MIME::Field::ParamVal versions before 5.521 for Perl allow CPU exhaustion via unclosed comments in header parameters.

The comment pattern used to parse Content-Type and Content-Disposition parameters scans from each "(" to the next ")". In a field with no ")", every "(" scans to the end of the header and fails, so parsing takes time quadratic in the header length. The field is parsed again on each attribute lookup, several times per MIME entity.

A 40 KB header takes about 7 seconds to parse once.

JSON source

https://cveawg.mitre.org/api/cve/CVE-2026-116268
Click to expand
{
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "cveMetadata": {
    "cveId": "CVE-2026-116268",
    "assignerOrgId": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
    "assignerShortName": "CPANSec",
    "dateUpdated": "2026-10-28T17:33:04.336Z",
    "dateReserved": "2026-10-25T18:05:02.236Z",
    "datePublished": "2026-10-28T17:33:04.336Z",
    "state": "PUBLISHED"
  },
  "containers": {
    "cna": {
      "providerMetadata": {
        "orgId": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
        "shortName": "CPANSec",
        "dateUpdated": "2026-10-28T17:33:04.336Z"
      },
      "title": "MIME::Field::ParamVal versions before 5.521 for Perl allow CPU exhaustion via unclosed comments in header parameters",
      "descriptions": [
        {
          "lang": "en",
          "value": "MIME::Field::ParamVal versions before 5.521 for Perl allow CPU exhaustion via unclosed comments in header parameters.\n\nThe comment pattern used to parse Content-Type and Content-Disposition parameters scans from each \"(\" to the next \")\". In a field with no \")\", every \"(\" scans to the end of the header and fails, so parsing takes time quadratic in the header length. The field is parsed again on each attribute lookup, several times per MIME entity.\n\nA 40 KB header takes about 7 seconds to parse once."
        }
      ],
      "affected": [
        {
          "collectionURL": "https://cpan.org/modules",
          "packageName": "MIME-tools",
          "modules": [
            "MIME::Field::ParamVal"
          ],
          "programFiles": [
            "lib/MIME/Field/ParamVal.pm"
          ],
          "programRoutines": [
            {
              "name": "MIME::Field::ParamVal::parse_params"
            }
          ],
          "repo": "https://salsa.debian.org/dskoll/mime-tools",
          "defaultStatus": "unaffected",
          "versions": [
            {
              "version": "0",
              "status": "affected",
              "versionType": "custom",
              "lessThan": "5.521"
            }
          ]
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "lang": "en",
              "description": "CWE-1333 Inefficient Regular Expression Complexity",
              "cweId": "CWE-1333",
              "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."
        }
      ]
    }
  }
}