CVE-2026-13221 is a critical-severity (CVSS 9.1) CWE-190 vulnerability. A fix is available — see the affected versions and patch details below.
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
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-13221.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
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.
Affected Products
perlperlDetection & mitigation playbook
VulnerabilityDetect
Identify every host running the affected component and compare the installed build against the fixed version below — for source-built or distro-packaged software the version string, not a lockfile, is the source of truth (`dpkg -l`, `rpm -q`, or the binary's own `--version`).
Fix
Upgrade the affected component to the fixed release for CVE-2026-13221, or apply your distribution's backported patch — distro builds are often patched at an older version number, so check your vendor's advisory rather than the upstream version alone.
Workarounds
Constrain what reaches the vulnerable code: limit the size and shape of untrusted input, isolate the affected component in a sandboxed or least-privileged process, and enable the platform's memory-safety mitigations (ASLR, stack protector, hardened allocator) so an out-of-bounds access is more likely to fail closed than to be exploitable.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Red Hat Product Security has rated this vulnerability moderate as exploiting it requires local access as well as complex buffer overflows to get access to running arbitrary code. Also a successful attack will depend strongly on the script that is housing the vulnerable regular expression. No production script should…
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Enterprise Linux 10 | perl-4:5.40.2-515.el10_2 | RHSA-2026:67156 |
| Red Hat Enterprise Linux 8 | perl-4:5.26.3-423.el8_10.1 | RHSA-2026:67162 |
| Red Hat Enterprise Linux 8 | perl:5.32-8100020260826134600.651ee29f | RHSA-2026:67278 |
| Red Hat Enterprise Linux 9 | perl-4:5.32.1-484.el9_8 | RHSA-2026:67155 |
| Red Hat OpenShift Container Platform 4.22 | openshift/ose-rhel-coreos-9:4.22.9.8.202609221802-0 | RHSA-2026:71446 |
| Red Hat Cost Management On-Premise 1 | costmanagement/costmanagement-ui-rhel10:1791460851 | RHSA-2026:79357 |
| Red Hat Hardened Images | perl-main-0.02-524.3.hum1 | RHSA-2026:39997 |
| Red Hat Update Infrastructure 5 | rhui5/rhua-rhel9:1789478095 | RHSA-2026:67956 |
Frequently Asked Questions
Is CVE-2026-13221 in your dependencies?
Find it across your dependency tree, including transitive dependencies.