CVE-2026-13221: CWE-190 Integer Overflow or Wraparound in SHAY perl
Perl versions through 5.43.9 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.
AI Analysis
Technical Summary
CVE-2026-13221 describes an integer overflow (CWE-190) in Perl's regular expression engine (Perl_study_chunk) affecting versions through 5.43.9. When an alternation pattern contains more than 65535 fixed string branches compiled into a trie, a 16-bit field storing the delta overflows, truncating the trie's match decision table without warning. This leads to silently incorrect matching behavior, producing both false positives and false negatives. The vulnerability impacts the correctness of regex-based filtering or access control decisions that rely on these patterns.
Potential Impact
The vulnerability causes Perl to produce incorrect regular expression matches silently, which can lead to security controls based on these regex patterns making incorrect decisions. This may result in unauthorized access being granted or legitimate access being denied, depending on the use case. There is no indication of remote code execution or denial of service from the provided data.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or temporary workaround is currently documented. Users should avoid using regex patterns with more than 65535 fixed string branches in alternations until a fix is available.
CVE-2026-13221: CWE-190 Integer Overflow or Wraparound in SHAY perl
Description
Perl versions through 5.43.9 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 software
Run 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 describes an integer overflow (CWE-190) in Perl's regular expression engine (Perl_study_chunk) affecting versions through 5.43.9. When an alternation pattern contains more than 65535 fixed string branches compiled into a trie, a 16-bit field storing the delta overflows, truncating the trie's match decision table without warning. This leads to silently incorrect matching behavior, producing both false positives and false negatives. The vulnerability impacts the correctness of regex-based filtering or access control decisions that rely on these patterns.
Potential Impact
The vulnerability causes Perl to produce incorrect regular expression matches silently, which can lead to security controls based on these regex patterns making incorrect decisions. This may result in unauthorized access being granted or legitimate access being denied, depending on the use case. There is no indication of remote code execution or denial of service from the provided data.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or temporary workaround is currently documented. Users should avoid using regex patterns with more than 65535 fixed string branches in alternations until a fix is available.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- CPANSec
- Date Reserved
- 2026-06-24T15:38:41.010Z
- Cvss Version
- null
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a55134768715ace437935a1
Added to database: 07/13/2026, 16:33:11 UTC
Last enriched: 07/13/2026, 16:47:50 UTC
Last updated: 07/13/2026, 23:35:56 UTC
Views: 19
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.