CVE-2026-13221: 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

Critical 9.1 EPSS 0.5% Perl

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.

What do these terms mean? CVE · CVSS score · exploited (KEV) · EPSS · backported fix · all terms

What to do now

  1. Check whether you run Perl and which version (commands below).
  2. Install the fixed version for your system: see “Patch it” below.
  3. Restart long-running Perl daemons (e.g. spamd, amavisd, munin-node)

Affected and fixed versions

Affected:

Patch it

Use the commands for your system. Distribution packages often keep an older version number with the fix backported, so compare with the fixed package versions in the table below, not only with the upstream version.

Debian
sudo apt update
sudo apt install --only-upgrade perl perl-base
Ubuntu
sudo apt update
sudo apt install --only-upgrade perl perl-base
RHEL, AlmaLinux, Rocky, Oracle
sudo dnf upgrade --refresh perl-interpreter perl-libs
Fedora
sudo dnf upgrade --refresh perl-interpreter perl-libs
SUSE / openSUSE
sudo zypper refresh
sudo zypper update perl perl-base
Amazon Linux
sudo dnf upgrade --releasever=latest perl-interpreter perl-libs
Arch Linux
sudo pacman -Syu
Alpine
apk update && apk upgrade perl
FreeBSD
pkg update && pkg upgrade perl5 (lang/perl5.42; or perl5.40)

General update steps for every system are on the Linux and Unix & BSD pages; after updating, see which services to restart.

Fix status in Linux distributions

ReleasePackageStatusFixed version / advisory
Debian 12perlfixed5.36.0-7+deb12u4
Debian 13perlfixed5.40.1-6+deb13u1
Debian testingperlfixed5.42.3-1
Red Hat Enterprise Linux 9perl-4:5.32.1-484.el9_8fixedRHSA-2026:67155
Red Hat Enterprise Linux 8perl-4:5.26.3-423.el8_10.1fixedRHSA-2026:67162
Red Hat Enterprise Linux 8perl:5.32-8100020260826134600.651ee29ffixedRHSA-2026:67278
Red Hat Enterprise Linux 7perlaffected
Red Hat Enterprise Linux 6perlaffected
Red Hat Enterprise Linux 10perl-4:5.40.2-515.el10_2fixedRHSA-2026:67156

From the Debian security tracker, Ubuntu CVE tracker and Red Hat Security Data API, refreshed every few hours.

Sources

Page generated automatically from official sources on 2026-11-03 18:05 UTC. Always confirm with your vendor's advisory.