Amazon Linux 2 (EOS) Security Advisory: ALAS2-2026-4026
Advisory Released Date: 2026-10-24
Advisory Updated Date: 2026-10-26
Perl versions through 5.45.1 have out-of-bounds heap reads and writes during regular expression matching via an undersized superlinear cache in S_regmatch.
The regex engine's superlinear cache holds one bit per subject position for each participating WHILEM node, so the bit count is the subject length plus one times the number of nodes. Nothing checks that product for positive overflow of the signed 32-bit count: a 286331153 byte subject matched against a pattern with 15 participating nodes stores the count as 14, leaving a two byte cache. The cache is then indexed from the real match position and node number, so reads go past the end of the allocation, and on failure CACHEsayNO sets a bit past it.
A caller that matches an attacker controlled subject of this size against a pattern of this shape can crash the process or corrupt heap memory. (CVE-2026-15534)
Perl versions from 5.9.4 before 5.41.9 produce incorrect regular expression match results when a stale failure flag ends the Aho-Corasick prescan early in S_find_byclass.
The prescan walks the subject for positions where the full pattern could match, and the engine tries it from the leftmost one recorded. A failing transition sets the failed flag, and a later successful transition does not clear it, so the prescan reads the stale flag as a failure and stops before it can record a candidate that starts earlier. It takes a subject where one candidate is recorded and a later character then forces a fallback through a fail link that succeeds.
Example:
"ABCDE" =~ m/ABCF|BCDE|C/; # matches C at offset 2, not BCDE
"ABCDE" =~ m/ABCF|BCDE|C(G)/; # no match, BCDE missed
An alternation like this can miss input it should match, or match it on the wrong branch, so an access or filtering decision made from the result can be wrong. (CVE-2026-19487)
Affected Packages:
perl
Note:
This advisory is applicable to Amazon Linux 2 (AL2) Core repository. Visit this FAQ section for the difference between AL2 Core and AL2 Extras advisories.
Issue Correction:
Run yum update perl or yum update --advisory ALAS2-2026-4026 to update your system.
aarch64:
perl-5.16.3-299.amzn2.0.6.aarch64
perl-libs-5.16.3-299.amzn2.0.6.aarch64
perl-devel-5.16.3-299.amzn2.0.6.aarch64
perl-macros-5.16.3-299.amzn2.0.6.aarch64
perl-tests-5.16.3-299.amzn2.0.6.aarch64
perl-Time-Piece-1.20.1-299.amzn2.0.6.aarch64
perl-core-5.16.3-299.amzn2.0.6.aarch64
perl-debuginfo-5.16.3-299.amzn2.0.6.aarch64
i686:
perl-5.16.3-299.amzn2.0.6.i686
perl-libs-5.16.3-299.amzn2.0.6.i686
perl-devel-5.16.3-299.amzn2.0.6.i686
perl-macros-5.16.3-299.amzn2.0.6.i686
perl-tests-5.16.3-299.amzn2.0.6.i686
perl-Time-Piece-1.20.1-299.amzn2.0.6.i686
perl-core-5.16.3-299.amzn2.0.6.i686
perl-debuginfo-5.16.3-299.amzn2.0.6.i686
noarch:
perl-CPAN-1.9800-299.amzn2.0.6.noarch
perl-ExtUtils-CBuilder-0.28.2.6-299.amzn2.0.6.noarch
perl-ExtUtils-Embed-1.30-299.amzn2.0.6.noarch
perl-ExtUtils-Install-1.58-299.amzn2.0.6.noarch
perl-IO-Zlib-1.10-299.amzn2.0.6.noarch
perl-Locale-Maketext-Simple-0.21-299.amzn2.0.6.noarch
perl-Module-CoreList-2.76.02-299.amzn2.0.6.noarch
perl-Module-Loaded-0.08-299.amzn2.0.6.noarch
perl-Object-Accessor-0.42-299.amzn2.0.6.noarch
perl-Package-Constants-0.02-299.amzn2.0.6.noarch
perl-Pod-Escapes-1.04-299.amzn2.0.6.noarch
src:
perl-5.16.3-299.amzn2.0.6.src
x86_64:
perl-5.16.3-299.amzn2.0.6.x86_64
perl-libs-5.16.3-299.amzn2.0.6.x86_64
perl-devel-5.16.3-299.amzn2.0.6.x86_64
perl-macros-5.16.3-299.amzn2.0.6.x86_64
perl-tests-5.16.3-299.amzn2.0.6.x86_64
perl-Time-Piece-1.20.1-299.amzn2.0.6.x86_64
perl-core-5.16.3-299.amzn2.0.6.x86_64
perl-debuginfo-5.16.3-299.amzn2.0.6.x86_64