Skip to content

CVE-2026-19487 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

MediumCVSS 5.3 EPSS 0.59%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
Proof of concept public · automatable: yes · technical impact: partial
Technology
UbuntuDebianRed Hat

Description

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.

Upgrade path

25 packages: 8 fixed, 17 with no fix yet.

PackageAffectedFixed inStatus
redhat/devspaces/code-rhel9(Red Hat openshift_devspaces 3) All versions No fix listed No fix yet
redhat/openshift/ose-rhel-coreos-8(Red Hat openshift 4) All versions No fix listed No fix yet
redhat/openshift/ose-rhel-coreos-9(Red Hat openshift 4) All versions No fix listed No fix yet
redhat/openshift/ose-rhel-coreos-9(Red Hat openshift 5) All versions No fix listed No fix yet
redhat/perl(Red Hat enterprise_linux 10) All versions No fix listed No fix yet
redhat/perl(Red Hat enterprise_linux 8) All versions No fix listed No fix yet
redhat/perl(Red Hat enterprise_linux 9) All versions No fix listed No fix yet
redhat/perl(Red Hat hummingbird 1) All versions No fix listed No fix yet
redhat/perl(Red Hat rhel_els 6) All versions No fix listed No fix yet
redhat/perl(Red Hat rhel_els 7) All versions No fix listed No fix yet
redhat/perl:5.32/perl(Red Hat enterprise_linux 8) All versions No fix listed No fix yet
redhat/rhoai/odh-workbench-codeserver-datascience-cpu-py312-rhel9(Red Hat openshift_ai) All versions No fix listed No fix yet
Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0) >= V3.1.7 No fix listed No fix yet
Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0) >= V3.1.7 No fix listed No fix yet
Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) >= V3.1.7 No fix listed No fix yet
Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AC0) >= V3.1.7 No fix listed No fix yet
Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP (6AG1518-4AX00-4AC0) >= V3.1.7 No fix listed No fix yet
azure linux perl(Azure Linux 3.0) < 5.38.2-516 5.38.2-516 Fixed
cpan perl >= 5.9.4, < 5.41.9 5.41.9 Fixed
debian/perl(Debian 12) < 5.36.0-7+deb12u4; = 5.36.0-7; = 5.36.0-7+deb12u1; = 5.36.0-7+deb12u2 +1 more 5.36.0-7+deb12u4 Fixed
debian/perl(Debian 13) < 5.40.1-6+deb13u1; = 5.40.1-6 5.40.1-6+deb13u1 Fixed
debian/perl(Debian 14) < 5.42.2-3; = 5.40.1-6; = 5.40.1-7; = 5.40.1-8 +5 more 5.42.2-3 Fixed
ubuntu/perl(Ubuntu 22.04) < 5.34.0-3ubuntu1.9 5.34.0-3ubuntu1.9 Fixed
ubuntu/perl(Ubuntu 24.04) < 5.38.2-3.2ubuntu0.6 5.38.2-3.2ubuntu0.6 Fixed
ubuntu/perl(Ubuntu 26.04) < 5.40.1-7ubuntu0.2 5.40.1-7ubuntu0.2 Fixed

Affected products

ProductAffected versionsFixed in
cpan perl >= 5.9.4, < 5.41.9 5.41.9
Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0) >= V3.1.7 No fix listed
Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0) >= V3.1.7 No fix listed
Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) >= V3.1.7 No fix listed
Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AC0) >= V3.1.7 No fix listed
Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP (6AG1518-4AX00-4AC0) >= V3.1.7 No fix listed
redhat/perl(Red Hat:enterprise_linux:10) All versions No fix listed
redhat/perl(Red Hat:rhel_els:6) All versions No fix listed
redhat/perl(Red Hat:rhel_els:7) All versions No fix listed
redhat/perl(Red Hat:enterprise_linux:8) All versions No fix listed
redhat/perl:5.32/perl(Red Hat:enterprise_linux:8) All versions No fix listed
redhat/perl(Red Hat:enterprise_linux:9) All versions No fix listed
redhat/perl(Red Hat:hummingbird:1) All versions No fix listed
redhat/rhoai/odh-workbench-codeserver-datascience-cpu-py312-rhel9(Red Hat:openshift_ai) All versions No fix listed
redhat/openshift/ose-rhel-coreos-8(Red Hat:openshift:4) All versions No fix listed
redhat/openshift/ose-rhel-coreos-9(Red Hat:openshift:4) All versions No fix listed
redhat/openshift/ose-rhel-coreos-9(Red Hat:openshift:5) All versions No fix listed
redhat/devspaces/code-rhel9(Red Hat:openshift_devspaces:3) All versions No fix listed
debian/perl(Debian:12) < 5.36.0-7+deb12u4 5.36.0-7+deb12u4
debian/perl(Debian:12) = 5.36.0-7 No fix listed
debian/perl(Debian:12) = 5.36.0-7+deb12u1 No fix listed
debian/perl(Debian:12) = 5.36.0-7+deb12u2 No fix listed
debian/perl(Debian:12) = 5.36.0-7+deb12u3 No fix listed
debian/perl(Debian:13) < 5.40.1-6+deb13u1 5.40.1-6+deb13u1
debian/perl(Debian:13) = 5.40.1-6 No fix listed
Show 13 more
ProductAffected versionsFixed in
debian/perl(Debian:14) < 5.42.2-3 5.42.2-3
debian/perl(Debian:14) = 5.40.1-6 No fix listed
debian/perl(Debian:14) = 5.40.1-7 No fix listed
debian/perl(Debian:14) = 5.40.1-8 No fix listed
debian/perl(Debian:14) = 5.42.0-1 No fix listed
debian/perl(Debian:14) = 5.42.0-2 No fix listed
debian/perl(Debian:14) = 5.42.0-3 No fix listed
debian/perl(Debian:14) = 5.42.2-1 No fix listed
debian/perl(Debian:14) = 5.42.2-2 No fix listed
ubuntu/perl(Ubuntu:22.04) < 5.34.0-3ubuntu1.9 5.34.0-3ubuntu1.9
ubuntu/perl(Ubuntu:24.04) < 5.38.2-3.2ubuntu0.6 5.38.2-3.2ubuntu0.6
ubuntu/perl(Ubuntu:26.04) < 5.40.1-7ubuntu0.2 5.40.1-7ubuntu0.2
azure linux perl(Azure Linux:3.0) < 5.38.2-516 5.38.2-516

References