CVE-2026-13221: CWE-190 Integer Overflow or Wraparound
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.
CVSS v3.1
Score 9.1critical
Affected software
pkg:github/perlRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-13221 is an integer overflow vulnerability (CWE-190) in Perl's regular expression engine affecting versions up to 5.43.9. When a regex pattern includes an alternation with more than 65535 fixed string branches compiled into a trie, a 16-bit field storing the delta between the first branch and the shared tail overflows. This truncates the trie's match decision table without warning or error, causing the regex engine to produce silently incorrect matches. The vulnerability impacts the integrity of regex matching, potentially leading to false positive and false negative matches, which can affect access control or filtering mechanisms relying on these patterns.
Potential Impact
The vulnerability causes the Perl regex engine to produce incorrect matching results, including false positives and false negatives, without any warning. This can lead to security controls based on regex patterns making incorrect decisions, potentially allowing unauthorized access or blocking legitimate requests. The CVSS score of 9.1 indicates a critical severity with high impact on integrity and availability, exploitable remotely without privileges or user interaction.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid using regex patterns with more than 65535 fixed string branches in alternations. Review and test regex patterns that gate access or filtering decisions to ensure correctness. Monitor vendor communications for official patches or updates.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- CPANSec
- Date Reserved
- 2026-06-24T15:38:41.010Z
- State
- PUBLISHED
Threat ID: 6a55134768715ace437935a1
Added to database: 07/13/2026, 16:33:11 UTC
Last enriched: 07/20/2026, 19:19:37 UTC
Last updated: 10/12/2026, 18:48:17 UTC
Views: 268
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.