{"id":"CVE-2026-13221","title":"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…","summary":"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…","severity":"critical","cvss":9.1,"cvssVector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","cwe":["CWE-190","CWE-625"],"vendor":"perl","product":"perl","affected":["perl <= 5.43.9"],"published":"2026-07-13","updated":"2026-09-08","sourceUpdated":"2026-09-08T22:17:37.217","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-13221","references":[{"url":"https://github.com/Perl/perl5/commit/03f74bbbd3a68350d926ee93d56ee4808c28c4c7.patch","label":"9b29abf9-4ab0-4765-b253-1875cd9b441e"},{"url":"https://github.com/Perl/perl5/issues/23388","label":"9b29abf9-4ab0-4765-b253-1875cd9b441e"},{"url":"http://www.openwall.com/lists/oss-security/2026/07/13/5","label":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-13221.json"},{"url":"https://access.redhat.com/security/cve/CVE-2026-13221"},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2499727"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-13221"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-13221"},{"url":"https://access.redhat.com/errata/RHSA-2026:67156"},{"url":"https://access.redhat.com/errata/RHSA-2026:67162"},{"url":"https://access.redhat.com/errata/RHSA-2026:67278"},{"url":"https://access.redhat.com/errata/RHSA-2026:67155"},{"url":"https://access.redhat.com/errata/RHSA-2026:39997"},{"url":"https://access.redhat.com/errata/RHSA-2026:67956"}],"tags":["nvd","cve.org","csaf","vex","red-hat","score-dispute"],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2026-07-14T13:33:13.127997Z"},"epss":0.00432,"epssPercentile":0.37051,"ingestedAt":"2026-09-08T22:12:31.038Z","patched":["enterprise_linux_appstream_v_10","enterprise_linux_appstream_v_8","enterprise_linux_appstream_v_9","enterprise_linux_baseos_v_8","hardened_images"],"scores":{"nvd":9.1,"vendor":5.9},"slug":"CVE-2026-13221","body":"## Overview\n\nPerl 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.\n\n## Affected\n\n- `perl <= 5.43.9`\n\n## Remediation\n\nRefer to the linked advisories for vendor-supplied fixes and affected version ranges.\n\n## Vendor advisories\n\n- **RHSA-2026:67156** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream (v. 10) · released 2026-09-14 · [advisory](https://access.redhat.com/errata/RHSA-2026:67156)\n- **RHSA-2026:67162** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream (v. 8), Red Hat Enterprise Linux BaseOS (v. 8) · released 2026-09-14 · [advisory](https://access.redhat.com/errata/RHSA-2026:67162)\n- **RHSA-2026:67278** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream (v. 8) · released 2026-09-14 · [advisory](https://access.redhat.com/errata/RHSA-2026:67278)\n- **RHSA-2026:67155** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream (v. 9) · released 2026-09-14 · [advisory](https://access.redhat.com/errata/RHSA-2026:67155)\n- **RHSA-2026:39997** · Red Hat · fixed in: Red Hat Hardened Images · released 2026-07-15 · [advisory](https://access.redhat.com/errata/RHSA-2026:39997)\n- **Red Hat VEX** · Moderate · affected: Red Hat Enterprise Linux 6, Red Hat Enterprise Linux 7, Red Hat OpenShift Container Platform 4, Red Hat OpenShift AI (RHOAI), Red Hat OpenShift Dev Spaces · no fix planned: Red Hat Enterprise Linux 6, Red Hat Enterprise Linux 7, Red Hat OpenShift Container Platform 4 · updated 2026-09-21 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-13221.json)\n- **RHSA-2026:67956** · Red Hat · fixed in: Red Hat Update Infrastructure 5 · released 2026-09-16 · [advisory](https://access.redhat.com/errata/RHSA-2026:67956)","depth":"midnight","depthScore":50,"depthScoreParts":{"impact":50.1,"likelihood":0.1,"exploitation":0,"ransomware":0},"changes":[]}