CVE-2026-13221 Details
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.
A vulnerability exists in Perl regular expression handling, specifically in versions through 5.43.9. When an expression includes more than 65,535 fixed string branches, it can lead to incorrect match results. This issue arises because the trie construction process, which optimizes regular expressions, uses a 16-bit field to store the delta between branches. An overflow occurs with branch counts exceeding 65,535, truncating the match decision table without any error or warning. As a result, the regex may produce false positives and false negatives, particularly when the pattern influences access or filtering decisions.
Users can upgrade to Perl version 5.44.0 or later, where this vulnerability has been addressed.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jul 14, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://cert-portal.siemens.com/productcert/html/ssa-457936.html | siemens-SADP | |
| https://github.com/Perl/perl5/commit/03f74bbbd3a68350d926ee93d56ee4808c28c4c7.patch | CPANSec | Patch |
| https://github.com/Perl/perl5/issues/23388 | CPANSec | Issue Tracking |
| http://www.openwall.com/lists/oss-security/2026/07/13/5 | CVE | Mailing ListPatchThird Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-190 | Integer Overflow or Wraparound | CPANSec |
Affected Products
| Product | Versions |
|---|---|
| perl perl | <= 5.43.9 |
CPE
Remediation
| |
Change History
8 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Nov 10, 2026 | CVE Modified | siemens-SADP |
| Oct 24, 2026 | CVE Translated | [email protected] |
| Sep 8, 2026 | CVE Modified | CVE |
| Sep 8, 2026 | CVE Modified | CPANSec |
| Jul 14, 2026 | Initial Analysis | [email protected] |
| Jul 14, 2026 | CVE Modified | CISA-ADP |
| Jul 13, 2026 | CVE Modified | CVE |
| Jul 13, 2026 | New CVE Received | CPANSec |