← Back to CVE Explorer

CVE-2026-13221

Full vulnerability record from the local CVENow database.

Description

Perl versions before 5.40.5-RC1, from 5.41.0 before 5.42.3-RC1, from 5.43.0 before 5.43.10 produce silently incorrect regular expression matches when an alternation of more than 65535 fixed string branches is compiled into a trie in Perl_study_chunk. When such branches are combined into a trie, the delta between the first branch and the shared tail is stored in a 16-bit field. A branch count above 65535 overflows the field, and the trie's match decision table is truncated with no warning or error. A pattern of this shape produces false positive matches (matching strings it should not) and false negative matches (failing to match strings it should). When such a pattern gates an access or filtering decision, the result is wrong.

Severity
CRITICAL
CVSS score
9.1 (v3.1)
Vulnerability status
Modified
Source identifier
9b29abf9-4ab0-4765-b253-1875cd9b441e
Published
2026-07-13 17:16:48.923000
Last modified
2026-10-24 22:10:00.210000
View original CVE JSON
{
  "id": "CVE-2026-13221",
  "sourceIdentifier": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
  "published": "2026-07-13T17:16:48.923",
  "lastModified": "2026-10-24T22:10:00.210",
  "vulnStatus": "Modified",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "Perl versions before 5.40.5-RC1, from 5.41.0 before 5.42.3-RC1, from 5.43.0 before 5.43.10 produce silently incorrect regular expression matches when an alternation of more than 65535 fixed string branches is compiled into a trie in Perl_study_chunk.\n\nWhen such branches are combined into a trie, the delta between the first branch and the shared tail is stored in a 16-bit field. A branch count above 65535 overflows the field, and the trie's match decision table is truncated with no warning or error.\n\nA pattern of this shape produces false positive matches (matching strings it should not) and false negative matches (failing to match strings it should). When such a pattern gates an access or filtering decision, the result is wrong."
    },
    {
      "lang": "es",
      "value": "Las versiones de Perl hasta la 5.43.9 producen silenciosamente coincidencias incorrectas de expresiones regulares cuando una alternancia de más de 65535 ramas de cadena fija se compila en un trie en Perl_study_chunk.\n\nCuando dichas ramas se combinan en un trie, el delta entre la primera rama y la cola compartida se almacena en un campo de 16 bits. Un recuento de ramas superior a 65535 desborda el campo, y la tabla de decisión de coincidencias del trie se trunca sin advertencia ni error.\n\nUn patrón de esta forma produce coincidencias de falsos positivos (coincidiendo con cadenas que no debería) y coincidencias de falsos negativos (fallando en coincidir con cadenas que sí debería). Cuando dicho patrón condiciona una decisión de acceso o filtrado, el resultado es incorrecto."
    }
  ],
  "affected": [
    {
      "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
      "affectedData": [
        {
          "defaultStatus": "unaffected",
          "collectionURL": "https://cpan.org/modules",
          "packageName": "perl",
          "modules": [
            "perl"
          ],
          "programFiles": [
            "regcomp_study.c"
          ],
          "programRoutines": [
            {
              "name": "Perl_study_chunk"
            }
          ],
          "repo": "https://github.com/Perl/perl5",
          "packageURL": "pkg:cpan/perl",
          "versions": [
            {
              "version": "0",
              "lessThan": "5.40.5-RC1",
              "versionType": "custom",
              "status": "affected"
            },
            {
              "version": "5.41.0",
              "lessThan": "5.42.3-RC1",
              "versionType": "custom",
              "status": "affected"
            },
            {
              "version": "5.43.0",
              "lessThan": "5.43.10",
              "versionType": "custom",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "[email protected]",
        "type": "Primary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H",
          "baseScore": 9.1,
          "baseSeverity": "CRITICAL",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "NONE",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "NONE",
          "integrityImpact": "HIGH",
          "availabilityImpact": "HIGH"
        },
        "exploitabilityScore": 3.9,
        "impactScore": 5.2
      },
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H",
          "baseScore": 9.1,
          "baseSeverity": "CRITICAL",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "NONE",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "NONE",
          "integrityImpact": "HIGH",
          "availabilityImpact": "HIGH"
        },
        "exploitabilityScore": 3.9,
        "impactScore": 5.2
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-07-14T13:33:13.127997Z",
          "id": "CVE-2026-13221",
          "options": [
            {
              "exploitation": "none"
            },
            {
              "automatable": "yes"
            },
            {
              "technicalImpact": "partial"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-190"
        }
      ]
    }
  ],
  "configurations": [
    {
      "nodes": [
        {
          "operator": "OR",
          "negate": false,
          "cpeMatch": [
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:perl:perl:*:*:*:*:*:*:*:*",
              "versionEndIncluding": "5.43.9",
              "matchCriteriaId": "3114EB35-3A49-4B90-9577-C80B1422D531"
            }
          ]
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://github.com/Perl/perl5/commit/03f74bbbd3a68350d926ee93d56ee4808c28c4c7.patch",
      "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://github.com/Perl/perl5/issues/23388",
      "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
      "tags": [
        "Issue Tracking"
      ]
    },
    {
      "url": "http://www.openwall.com/lists/oss-security/2026/07/13/5",
      "source": "af854a3a-2127-422b-91ae-364da2661108",
      "tags": [
        "Mailing List",
        "Patch",
        "Third Party Advisory"
      ]
    }
  ]
}