Security Advisories (1)
CVE-2026-15534 (2026-08-09)

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.

NAME

locale - Perl pragma to use or avoid POSIX locales for built-in operations

SYNOPSIS

my @x1 = sort @y;      # Native-platform/Unicode code point sort order
{
    use locale;
    my @x2 = sort @y;  # Locale-defined sort order
}
my @x3 = sort @y;      # Native-platform/Unicode code point sort order
                       # again

# Parameters to the pragma are to work around deficiencies in locale
# handling that have since been fixed, and hence these are likely no
# longer useful
use locale qw(:ctype :collate);    # Only use the locale for character
                                   # classification (\w, \d, etc.), and
                                   # for string comparison operations
                                   # like '$a le $b' and sorting.
use locale ':not_characters';      # Use the locale for everything but
                                   # character classification and string
                                   # comparison operations

use locale ':!numeric';            # Use the locale for everything but
                                   # numeric-related operations
use locale ':not_numeric';         # Same

no locale;             # Turn off locale handling for the remainder of
                       # the scope.

DESCRIPTION

This pragma tells the compiler to enable (or disable) the use of POSIX locales for built-in operations (for example, LC_CTYPE for regular expressions, LC_COLLATE for string comparison, and LC_NUMERIC for number formatting). Each use locale or no locale affects statements to the end of the enclosing BLOCK.

The pragma is documented as part of perllocale.