CVE-2026-13221 Integer overflow in perl:perl

Critical 9.1 Published Updated

Perl regex engine integer overflow causes incorrect matches, potentially bypassing security filters or access controls.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-13221?

CVE-2026-13221 is a critical vulnerability in perl:perl, published on 13 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-190

Which versions are affected by CVE-2026-13221?

It affects 1 product.

Linux distribution packages (40)
perl AlmaLinux:10All versions4:5.40.2-515.el10_2
perl-Attribute-Handlers AlmaLinux:10All versions1.03-515.el10_2
perl-AutoLoader AlmaLinux:10All versions5.74-515.el10_2
perl-AutoSplit AlmaLinux:10All versions5.74-515.el10_2
perl-B AlmaLinux:10All versions1.89-515.el10_2
perl-Benchmark AlmaLinux:10All versions1.25-515.el10_2
perl-Class-Struct AlmaLinux:10All versions0.68-515.el10_2
perl-Config-Extensions AlmaLinux:10All versions0.03-515.el10_2
perl-DBM_Filter AlmaLinux:10All versions0.06-515.el10_2
perl-Devel-Peek AlmaLinux:10All versions1.34-515.el10_2
perl-Devel-SelfStubber AlmaLinux:10All versions1.06-515.el10_2
perl-DirHandle AlmaLinux:10All versions1.05-515.el10_2
perl-Dumpvalue AlmaLinux:10All versions2.27-515.el10_2
perl-DynaLoader AlmaLinux:10All versions1.56-515.el10_2
perl-English AlmaLinux:10All versions1.11-515.el10_2
perl-Errno AlmaLinux:10All versions1.38-515.el10_2
perl-ExtUtils-Constant AlmaLinux:10All versions0.25-515.el10_2
perl-ExtUtils-Embed AlmaLinux:10All versions1.35-515.el10_2
perl-ExtUtils-Miniperl AlmaLinux:10All versions1.14-515.el10_2
perl-Fcntl AlmaLinux:10All versions1.18-515.el10_2
perl-File-Basename AlmaLinux:10All versions2.86-515.el10_2
perl-File-Compare AlmaLinux:10All versions1.100.800-515.el10_2
perl-File-Copy AlmaLinux:10All versions2.41-515.el10_2
perl-File-DosGlob AlmaLinux:10All versions1.12-515.el10_2
perl-File-Find AlmaLinux:10All versions1.44-515.el10_2
perl-File-stat AlmaLinux:10All versions1.14-515.el10_2
perl-FileCache AlmaLinux:10All versions1.10-515.el10_2
perl-FileHandle AlmaLinux:10All versions2.05-515.el10_2
perl-FindBin AlmaLinux:10All versions1.54-515.el10_2
perl-GDBM_File AlmaLinux:10All versions1:1.24-515.el10_2
perl-Getopt-Std AlmaLinux:10All versions1.14-515.el10_2
perl-Hash-Util AlmaLinux:10All versions0.32-515.el10_2
perl-Hash-Util-FieldHash AlmaLinux:10All versions1.27-515.el10_2
perl-I18N-Collate AlmaLinux:10All versions1.02-515.el10_2
perl-I18N-LangTags AlmaLinux:10All versions0.45-515.el10_2
perl-I18N-Langinfo AlmaLinux:10All versions0.24-515.el10_2
perl-IO AlmaLinux:10All versions1.55-515.el10_2
perl-IPC-Open3 AlmaLinux:10All versions1.22-515.el10_2
perl-Locale-Maketext-Simple AlmaLinux:10All versions1:0.21-515.el10_2
perl-Math-Complex AlmaLinux:10All versions1.62-515.el10_2

Products include Perl Perl.

How do I fix CVE-2026-13221?

Upgrade to a fixed version.

Is CVE-2026-13221 being exploited?

There is no known exploitation of CVE-2026-13221 in the wild and no public exploit code.

Sources

Also known as ALPINE-CVE-2026-13221, ALSA-2026:67155, ALSA-2026:67156, ALSA-2026:67162, ALSA-2026:67278, AZL-92300 and 22 more.

Is CVE-2026-13221 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free