Skip to content

CVE-2026-8376 Perl versions before 5.40.5-RC1, from 5.41.0 before 5.42.3-RC1, from 5.43.0 before 5.43.11 have a heap buffer overflow when compiling regular expressions with a repeated fixed string on 32-bit builds

CriticalCVSS 9.8 EPSS 0.64%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: yes · technical impact: partial
Technology
UbuntuDebianRed Hat

Description

Perl versions before 5.40.5-RC1, from 5.41.0 before 5.42.3-RC1, from 5.43.0 before 5.43.11 have a heap buffer overflow when compiling regular expressions with a repeated fixed string on 32-bit builds.

Perl_study_chunk in regcomp_study.c checked the size of the joined substring buffer in characters rather than bytes. For a quantified fixed substring with a large minimum count, the byte length mincount * l could overflow SSize_t, producing an undersized SvGROW allocation; the subsequent copy writes past the end of the buffer.

A caller that compiles an attacker-controlled regular expression on a 32-bit perl build triggers a heap buffer overflow at compile time.

Upgrade path

16 packages: 10 fixed, 6 with no fix yet.

PackageAffectedFixed inStatus
azure linux perl(Azure Linux 4.0) 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
alpine/perl(Alpine v3.24) < 5.42.3-r0 5.42.3-r0 Fixed
azure linux perl(Azure Linux 3.0) < 5.38.2-511; < 5.38.2-512 5.38.2-511, 5.38.2-512 Fixed
cpan perl < 5.40.5-RC1; >= 5.41.0, < 5.42.3-RC1; >= 5.43.0, < 5.43.11 5.40.5-RC1, 5.42.3-RC1, 5.43.11 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.40.1-8; = 5.40.1-6; = 5.40.1-7 5.40.1-8 Fixed
perl <= 5.43.10 after 5.43.10 Fixed
ubuntu/perl(Ubuntu 22.04) < 5.34.0-3ubuntu1.7 5.34.0-3ubuntu1.7 Fixed
ubuntu/perl(Ubuntu 24.04) < 5.38.2-3.2ubuntu0.3 5.38.2-3.2ubuntu0.3 Fixed
ubuntu/perl(Ubuntu 26.04) < 5.40.1-7ubuntu0.1 5.40.1-7ubuntu0.1 Fixed

Affected products

ProductAffected versionsFixed in
cpan perl < 5.40.5-RC1 5.40.5-RC1
cpan perl >= 5.41.0, < 5.42.3-RC1 5.42.3-RC1
cpan perl >= 5.43.0, < 5.43.11 5.43.11
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:rhel_els:6) All versions No fix listed
redhat/perl(Red Hat:rhel_els:7) 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
debian/perl(Debian:14) < 5.40.1-8 5.40.1-8
debian/perl(Debian:14) = 5.40.1-6 No fix listed
debian/perl(Debian:14) = 5.40.1-7 No fix listed
ubuntu/perl(Ubuntu:22.04) < 5.34.0-3ubuntu1.7 5.34.0-3ubuntu1.7
alpine/perl(Alpine:v3.24) < 5.42.3-r0 5.42.3-r0
ubuntu/perl(Ubuntu:24.04) < 5.38.2-3.2ubuntu0.3 5.38.2-3.2ubuntu0.3
ubuntu/perl(Ubuntu:26.04) < 5.40.1-7ubuntu0.1 5.40.1-7ubuntu0.1
perl <= 5.43.10 No fix listed
Show 3 more
ProductAffected versionsFixed in
azure linux perl(Azure Linux:3.0) < 5.38.2-511 5.38.2-511
azure linux perl(Azure Linux:3.0) < 5.38.2-512 5.38.2-512
azure linux perl(Azure Linux:4.0) All versions No fix listed

References