
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-13221 is an integer overflow vulnerability in Perl's regular expression engine that causes silently incorrect regex matches when an alternation of more than 65,535 fixed string branches is compiled into a trie in Perl_study_chunk. Affected versions include all Perl releases through 5.43.9; the fix was introduced in Perl 5.43.10. The issue was originally reported as a bug (GH #23388) on June 27, 2025, and publicly disclosed as a CVE on July 13, 2026 by the CPAN Security Group. It carries a CVSS v3.1 base score of 9.1 (Critical) (Github Advisory, Openwall OSS-Sec).
The root cause is CWE-190 (Integer Overflow or Wraparound): when Perl's regex compiler (regcomp_study.c) combines more than 65,535 fixed-string alternation branches into a trie, the delta between the first branch and the shared tail node is stored in a 16-bit field. A branch count exceeding 65,535 overflows this field, truncating the trie's match decision table silently — no warning or error is emitted. The result is that the compiled pattern produces false positive matches (matching strings it should not) and false negative matches (failing to match strings it should). The vulnerability is exploitable remotely with no authentication or user interaction required, provided an attacker can supply input to a Perl application that uses such a large alternation regex for access control or filtering decisions. The fix (commit 03f74bbbd) adds a guard in regcomp_study.c to skip trie optimization when the branch-to-tail delta would exceed U16_MAX (Perl5 Commit Patch, Perl5 Issue #23388).
Successful exploitation allows an unauthenticated network attacker to bypass security filters or access controls implemented in Perl applications that rely on large alternation regex patterns for allow/deny decisions. The integrity impact is high — an attacker can cause the regex to accept inputs it should reject (false positives), enabling unauthorized access, or reject inputs it should accept (false negatives), causing denial of service for legitimate users. Confidentiality is not directly impacted, but integrity and availability are both rated High. Applications using such patterns as blocklists, allowlists, or input validators are at greatest risk (Github Advisory, Openwall OSS-Sec).
There is no public proof-of-concept exploit and no evidence of in-the-wild exploitation as of the disclosure date (Github Advisory). The EPSS score is approximately 0.207% (per Feedly) to 0.432% (per GitHub Advisory), placing it in the 35th percentile for exploitation likelihood within 30 days. The vulnerability is classified as automatable (no user interaction required) with network attack vector and low complexity, but exploitation requires the target application to use a regex with more than 65,535 alternation branches — a relatively uncommon pattern in practice. No threat actor attribution or CISA KEV catalog listing has been identified (Github Advisory).
m/(?:aaa|aab|...|mzz)|(?:naa|...|zzz)/).use re 'Debug'); the original bug report noted crashes with use re 'Debug' enabled on affected versions (Perl5 Issue #23388).The fix is included in Perl 5.43.10 (development release), which adds a guard in regcomp_study.c to skip trie optimization when the branch-to-tail delta would overflow a 16-bit field. Organizations should upgrade to Perl 5.43.10 or later, or apply the upstream patch (commit 03f74bbbd3a68350d926ee93d56ee4808c28c4c7) directly. As a workaround, developers should audit Perl applications for regex patterns with more than 65,535 alternation branches used in security-sensitive contexts and refactor them to avoid this pattern (e.g., split into multiple smaller regexes or use hash-based lookups instead). Red Hat has issued an errata (RHSA-2026:39997) for affected distributions (Openwall OSS-Sec, Perl5 Commit Patch).
The vulnerability was disclosed by Stig Palmquist on behalf of the CPAN Security Group via the oss-security mailing list on July 13, 2026, with a clear technical description and patch reference (Openwall OSS-Sec). Microsoft acknowledged the CVE through its Security Response Center advisory (Microsoft MSRC). Community discussion on the Perl5 Porters mailing list addressed the fix and its implications for the 5.44 release cycle. Coverage also appeared in general Linux and Perl community outlets noting the Perl 5.44 release that incorporated the fix (Heise).
Fix availability across major Linux distributions and their releases.
bookworm
perl: 5.36.0-7+deb12u4
sid
perl: 5.42.3-1
trixie
perl: 5.40.1-6+deb13u1
bionic (esm-infra)
perl: 5.26.1-6ubuntu0.7+esm3
devel
perl
focal (esm-infra)
perl: 5.30.0-9ubuntu0.5+esm3
jammy
perl: 5.34.0-3ubuntu1.8
noble
perl: 5.38.2-3.2ubuntu0.4
resolute
perl: 5.40.1-7ubuntu0.3
trusty (esm-infra-legacy)
perl: 5.18.2-2ubuntu1.7+esm8
xenial (esm-infra-legacy)
perl: 5.22.1-9ubuntu0.9+esm3
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."